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.
[2,2,3,10]
Till1: 2 + 3 == 5
Till2: 2 + 10 == 12
Charon06, you are wrong my friend.
queueTime( [2,2,3,10] , 2 )
returns12
because it should. What do you expect?It's not what the kata ask, you shouldn't reverse a number digits, you should reorder them to make the biggest number with the same digits.
The value 10 is the last elemnt in the array (the client with the most items).
As he (the last client) would come to the window last, it would take him 10 seconds to process his items and plus 2 seconds from the previous client.
You can use Console.WriteLine() to write to output, and see what is passed to you method. Last thing written is the one that failed. Took me a while to figure out why my regex was failing.
Well, if you can't pass them that's because your solution is wrong. Most likely you're handling extra whitespace incorrectly.