The problem statement should say what is and is not allowed for the solution, particularly if you're going to invalidate previously valid solutions.
Agree with Guillaume.
Only works for integer numbers.
I find it ironical that you disallow unique in the test suite, yet your own solution is just a roundabout way of calling unique
Yes !
two guys, calm down, I also raise it by other people's solution
copy from Peng Liu, delete comments
289 Solvers
348 Solvers
123 Solvers
275 Solvers
2617 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!