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.
Hi, there's some inconsistency in random tests. I got this message:
buses(0, 8, 2): 4 should equal 0
But you get more fails after changing the solution to return 0 when there are no kids:
buses(0, 46, 17): 0 should equal 3
buses(0, 33, 5): 0 should equal 7
Wow, I really underestimated that kata. I was even halfway, but unfortunately abandoned the right way of thinking. Thanks for explaining that.
You should check your test cases. I seem to fail every time the input consists of 4 or more numbers, so let's consider this one [100, 14, 3, 4]
At most 2 warriors can travel at once. The fastest warrior travels for 3 minutes, so he's carrying the lamp.
This gives 100+3+14+3+4 = 124, but kata expects 115.
For larger inputs the required result is almost a half of what I get
Hey, you are able to go back to your previously attempted katas through your profile. Just hover over your avatar or ranking graph in the upper-right corner and select "View Profile" and then go to "Solutions" tab. You will be able to see all your solutions there - even if they're not completed.
There is also more user-friendly solution if you know that you have to go but want to return to that kata. Simply click a start sign below the name of your current kata. You can then access it by hovering your mouse over a graph with a star in top-right corner.
Have fun coding!