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.
got 49 here, lol, but still failing random
25,0,24
there is one with 25,0,24, which is greater than 29, 14
I'm sorry. I had to relook at my code and saw that the error came bacause I was iterating with the actual elements. I changed it to their index and it's working fine now.
Thank you.
Your code is wrong:
Not a kata issue.
Please don't make a comment like that if you're not 100% sure about it.
Example:
max_sequence([-21, -21, 29, 14, -25, -10, 9, 1, 9, -25, -11, -14, -1, -27, -4, 2, -3, 7, -7, -17, 9, 1, 10, 25, -29, 6, -21, -7, 25, 0, 24, -4, -10, -19, -23, 18, -22, 3, -7, -23, -22, -1, -23, -10, 19, 10, -22, 19, -16, 17])
result: 43 should equal 49
HOW?
Please, provide some examples of this. In which language?
I checked the solutions after the result of my code and the expected answers of some of the random sequences were constantly different.
All I can say is the 'solutions' did not follow the instructions of the kata; which means the kata creator didn't understand their own kata.
Example:
max_sequence([-21, -21, 29, 14, -25, -10, 9, 1, 9, -25, -11, -14, -1, -27, -4, 2, -3, 7, -7, -17, 9, 1, 10, 25, -29, 6, -21, -7, 25, 0, 24, -4, -10, -19, -23, 18, -22, 3, -7, -23, -22, -1, -23, -10, 19, 10, -22, 19, -16, 17])
result: 43 should equal 49
HOW?
The timeouts are because the iterations are on s2 can be over 600,000. Using set(s2) limits the iteration to 26 because there are only 26 unique aphabets, so the iterations are 26 or less.