Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
When I use performance.now() I don't see any difference between both solution
.
Done, let me know what you think.
Description should be more clear that we are looking for the next closest city in the route.
Unpublishing
True that
Duplicate:
http://www.codewars.com/kata/strange-principal
Thanks! I'm glad you enjoyed it. It's always great to have that "Aha!" moment :)
Nice Kata, Mike. I started out really poorly with some nested loops, but soon found the solution when the pattern became apparent.
Marking as resolved
No problem! Just wanted to help. You could mark this issue as resolved now.
Thanks for those the test cases and general cleanup!
I added 100 random tests each to the Python and JavaScript versions. This is the first time I have done JavaScript tests but it seemed simple enough to just generate a random integer.
Hope you don't mind the changes @mheavenor!
Needs random test cases :)
This solution's algorithm is O(ab) yet it is possible to write one that is O(a + b).
Please consider the performance of solutions