문제를 풀었습니다


Make a simplified barcode
Given an integer to encode, make a barcode using the following encoding scheme: * The bar code is made from the binary versio...

대략 14년 전

문제를 풀었습니다


The Birthday Phenomenon
First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...

대략 14년 전

문제를 풀었습니다


Retirement savings
At the start of what year will you have reached or exceeded a savings goal? Parameters (all are constant scalars given in a s...

대략 14년 전

문제를 풀었습니다


Recurrence relation
A recurrence relation is given by P(1) := 1 P(n+1) := exp(1) - (n+1)*P(n) Write a function that, given an integer |...

대략 14년 전

문제를 풀었습니다


More luck than brains
Give a random function that guess and return numbers from 1 to 6 exactly like the test suite .

대략 14년 전

문제를 풀었습니다


"Look and say" sequence
What's the next number in this sequence? * [0] * [1 0] * [1 1 1 0] * [3 1 1 0] * [1 3 2 1 1 0] This a variant on the w...

대략 14년 전

문제를 풀었습니다


Reduce - Map-Reduce
Write reduce function, that takes arguments and constantly folds results into next call argument, finally returning a value; ...

대략 14년 전

문제를 풀었습니다


Repopulate the City
For any population p of positive integers between pmin and pmax, we can calculate histogram count n for a list of evenly dividin...

대략 14년 전

문제를 풀었습니다


Greed is good - Simple partition P[n].
Find a simple partition P[n]. E.g. P[10] = 4 + 3 + 2 + 1. # There are many solutions, compute just one set. # Don't repeat ...

대략 14년 전

문제를 풀었습니다


Create a patchwork matrix
This function will assemble a large matrix out of a number of smaller ones m1, m2, etc., according to a pattern P. If P is 3x5,...

대략 14년 전

문제를 풀었습니다


Matrix indexing with two vectors of indices
Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

대략 14년 전

문제를 풀었습니다


All Humans are Created Equal - Pareto Equality
One way or the other two sets of identical types can come out ahead of the other by idea of Pareto equality. Pareto equality b...

대략 14년 전

문제를 풀었습니다


middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

대략 14년 전

문제를 풀었습니다


Implement a counter
Write a function that returns a function that counts the number of times it is invoked. Example: >> h = counter; >> h() ...

대략 14년 전

문제를 풀었습니다


Function composition - harder
Write a function that accepts an arbitrary number of function handles f_1, f_2, ..., f_n and returns the composition h. That is,...

대략 14년 전

문제를 풀었습니다


Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

대략 14년 전

문제를 풀었습니다


Spiral In
Create an m by n matrix filled with sequential integers starting from 1 and arranged in a counterclockwise spiral that hugs the ...

대략 14년 전

문제를 풀었습니다


Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

대략 14년 전

문제를 풀었습니다


Sort numbers by outside digits
Sort the array so that they are sorted as if their value was a 5 digit number made from the first three and last two digits of t...

대략 14년 전

문제를 풀었습니다


Encoding Google Maps Polylines
This problem is based on the Google Polyline Encoder algorithm. This is how Google Maps encodes a line for display on a map. You...

대략 14년 전

문제를 풀었습니다


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

대략 14년 전

문제를 풀었습니다


Boolean algebra
Your contractor from Elbonia has sent you the prototype of the new logical unit. It turns out that the only logical relation it ...

대략 14년 전

문제를 풀었습니다


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

대략 14년 전

문제를 풀었습니다


Transposition as a CIPHER
This all about transcripting a text message. If the input string is: *s1 = 'My name is Sourav Mondal'*, then the output is: *s2...

대략 14년 전

문제를 풀었습니다


How to add?
* Imagine you are in 2222 Anno Domini, when everyone must learn how to add, * and competing for the highly prestigious post of,...

대략 14년 전

문제를 풀었습니다


Find the jerk
No, it's not the author of this problem... Jerk is the rate of change in acceleration over time of an object. So, if given t...

대략 14년 전

문제를 풀었습니다


Set defaults
Write a function that computes the volume of a cube. The function should be able to accept three inputs: the length, width, and...

대략 14년 전

문제를 풀었습니다


Find best domino orientation
Given a list of pairs, find the orientation they should be placed in a line, such that the sum of the absolute values of the dif...

대략 14년 전

문제를 풀었습니다


Choose the best fitting dominoes
You will be given a cell array of nx2 matrices. Choose one row from each matrix. These are the ordered pairs that will be plac...

대략 14년 전

문제를 풀었습니다


Find best placement for ordered dominoes (harder)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

대략 14년 전

더 보기