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
2282 Solvers
117 Solvers
104 Solvers
Encoding Google Maps Polylines
12 Solvers
132 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!