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.
the if block will never occur because you sort your digits but then you compare it to the "check" array which has 0 at the end of the array and not the start.
This comment is hidden because it contains spoiler information about the solution
Maths behind this problem is very interesting. Cool Kata!
Enjoyed this kata, good job!
if you look up the (connect the ropes to minimise cost) it is much better explained there and will remove confusion because many people think for numbers [1,2,3,4,5] the minimal cost is 34 but it is actually 33'