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.
Genralized tip:
You'll fail all the test, but usually you'll see the input. (Except, as you'll discover here, not always.)
Often this will help you find out the count of tests. (Although, again not always.)
I was able to reach 65 tests, but still timed out. I suspect we're using the same algorithm (but I've optimized mine as much as possible). I have in mind another algorithm which I think may be faster, but don't have time to implement it at the moment. I'd encourage you to try a different approach. 232 people have solved it in Python, so it should be doable.
No spoilers, sorry. :)
Also, you might wanna search it up on wikipedia, if you don't succeed yourself. There's a nuance that could potentially not let you pass.
O(n*sqrt(n)*m) per entire test suite, where m is the number of tests isn't supposed to pass. Gotta reduce this somehow. Remember about the upper bound.