Please add more cases to the test suite, or else it is trivial to solve this problem.
Rafael is right and since you made this into a badge problem it is even more essential to fix this
Find common elements in matrix rows
1267 Solvers
Back to basics 11 - Max Integer
680 Solvers
Find nearest prime number less than input number
274 Solvers
Generate a vector like 1,2,2,3,3,3,4,4,4,4
3879 Solvers
3125 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!