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.
Your code being too slow is not a kata issue. Try a faster algorithm.
One of the Tags of this kata is
PERFORMANCE
.Could the test script be causing a time out problem? Only in the test of 10000 random numbers that I am having a problem and it is a time out problem....
This comment is hidden because it contains spoiler information about the solution
In the game there is every hand there is a hand that wins and another that loses, put in sequence, there will always be a winning hand in front and a losing hand in the back. In the return list, when the subtraction is zero, both have the same hand, so there is an impact, if the difference is just one unit, then p1 winner, and if the difference is 2 p2 winner, matching the indices defined in the list .