nice (and difficult) problem! (if possible, please fix the testsuite adding something along the lines of "assert(n==numel(unique(c)))")
example of invalid solution
485 Solvers
819 Solvers
22 Solvers
Back to basics 23 - Triangular matrix
634 Solvers
2810 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!