This is (more or less) cribbed from the USC contest winner's solution.
Very fast and very compact solution. Nice usage of complex to calculate distance between points and recursion.
341 Solvers
133 Solvers
Getting the indices from a matrice
368 Solvers
Given a matrix, swap the 2nd & 3rd columns
535 Solvers
77 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!