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.
Optimization / memoization required
How do you know how many test you have gone through before time-out?
Forbid the input modification.
Read this, post your code here following the directions there.
Have you removed the max value from the list somehow? If you did, then the list without that value is what the control function used to get the two max values and that's why it expects a different result.
Did you mutate the list?
Well, now you know why you're getting a timeout then. Make it faster.
There are 100 random tests.
Print the input?
Last one printed failed ..
i just checked and everything works fine
i think problem might be with infinite recursion (if you are using recursion) and print every thing to keep an eye on what is going on..
edit: if that doesn't work then use print(whatever, flush=True)
Which language?
Please be aware of the meaning of the suggestion flag .
From https://github.com/codewars/codewars.com/wiki/Kata-Discourse#suggestions
Don't worry MathCommander, I just think you gave away too much. A small hint in the right direction is OK, but your correct and thorough explanation is the part that has to be solved by the users themselves. They must read the instructions and analyse the results to debug their program if something is wrong.
Enjoy your time @codewars!
@MathCommander,
Your help is appreciated, but please don't give away the solution. I flaggged your comment as a spoiler.
Cheers