Solved


Coin change combinations.
Using only pennies (1), nickels (5), dimes (10), quarters (25), half dollars (50), and dollars (100), how many different combina...

13 years ago

Solved


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

13 years ago

Solved


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,...

13 years ago

Solved


Negative matrix
Change the sign of all elements in given matrix.

13 years ago

Solved


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

13 years ago

Solved


Morse Code Generator! Try it!
.... . .-.. .-.. --- . ...- . .-. -.-- --- -. . -.-.-- .-.. . - ... -.. --- ... --- -- . -- --...

13 years ago

Solved


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

13 years ago

Solved


Connect Four: find winning move
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/90-connect-four-win-checker this problem>... <http://en.wik...

13 years ago

Solved


Find last zero for each column
Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...

13 years ago

Solved


Leftovers? Again?!
I am thinking of a positive number X. To determine what number I am thinking of, I will give you two 1xN vectors. The first ve...

13 years ago

Solved


Poker Card Deal!
Anyone want to play a card game? Well this is making one deck of cards, with the option of using 2 jokers. The outputs are ...

13 years ago

Solved


mathematics , probability problem
How many different result can we have, rolling k dice?

13 years ago

Solved


Twist 'n' Match
Given n and m, construct an n-by-n matrix a such that a, when rotated 90 degrees and compared with itself, matches itself in exa...

13 years ago

Solved


Create logical matrix with a specific row and column sums
Given two numbers *|n|* and *|s|*, build an |n-by-n| logical matrix (of only zeros and ones), such that both the row sums and th...

13 years ago

Solved


intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

13 years ago

Solved


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

13 years ago

Solved


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

13 years ago

Solved


Count consecutive 0's in between values of 1
So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...

13 years ago

Solved


Now 20% off!
Furloughs are hitting government workers this year. To commemorate getting one unpaid day off each week until the end of Septem...

13 years ago

Solved


Generate a melodic contour string matrix
<http://en.wikipedia.org/wiki/Parsons_code Parsons code> is a surprisingly effective way to identify music by its melodic motion...

13 years ago

Solved


Make a list string
Given a cell string, produce a string separating the items with spaces and commas and with an 'and' preceding the final item, an...

13 years ago

Solved


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

13 years ago

Solved


Identify Reachable Points
Given a vector of 2-D Points and a vector of 2-D Deltas create an array of all Locations that can be reached from the points usi...

13 years ago

Solved


Generate the Matrix!
Given n, generate the following matrix: a = [ n n-1 n-2 ... 2 1; n-1 n-1 n-2 ... 2 1; n-2 n-2 n-2 ... 2 1;...

13 years ago

Solved


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

13 years ago

Solved


Josephus Survivor
The <http://en.wikipedia.org/wiki/Josephus_problem Josephus Challenge> is to find the position that is the last remaining when e...

13 years ago

Solved


sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

13 years ago

Solved


factor to number
e.g. input number x=10 then it should produce y=25 or x=100 then y should be 2255. write a function or code to generate the same...

13 years ago

Solved


Can I make a right triangle ?
Input(a) - is vector with any amount of values. Interpreted as legths of sides. Output(b): * Is true if there are any 3 va...

13 years ago

Solved


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

13 years ago

Load more