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.
Priority goes to the Power Gem with higher elevation, so in your example the first case would be the correct result.
I picked the closest solution I had - mine. In fact, I improved my old and bad algorithm and managed to get a
2x
increase in execution speed (tested with the same input as in the previous fork).Not really. Tested on greater input values, your solution is degrading faster (press
View Run Output
, and you should see 2 collapsed blocks; open them and you'll see the execution time).yes, the performance tests were completely wrong..... I corrected them, your solution should be marked as invalid soon.