Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN;
output -> matrix(p*m), the same matrix where we deleted the enti...
5 years ago
Solved
Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...
5 years ago
Solved
The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach
conjecture> asserts that every even integer greater than 2 can ...
5 years ago
Solved
Kaprekar Steps
6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...
5 years ago
Solved
Word Counting and Indexing
You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...
5 years ago
Solved
Find the two-word state names
Given a list of states, remove all the states that have two-word names.
If
s1 = 'Alabama Montana North Carolina Vermont N...
5 years ago
Solved
Find common elements in matrix rows
Given a matrix, find all elements that exist in every row.
For example, given
A =
1 2 3 5
9 2 5 9
3 2 5 9
...
5 years ago
Solved
Find the peak 3n+1 sequence value
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...
5 years ago
Solved
Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if
list = {'Barney Google','Snuffy Smith','Dagwood ...