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.
Yes, unfortunately I wasn't aware of that kata as discussed below
Well, that's a bummer... I only searched for terms like exponents, exponentiation and such. I'm marking the issue as resolved only because I don't know what else to do. Perhaps a mod can delete this if it's strictly against the rules.
Approved, thanks for the contribution.
Python version tests for
near_flatten
but the starting solution is calledflatten
This comment is hidden because it contains spoiler information about the solution
Can you explain how this works?
Also, although quite clever, your solution fails when N > 10000. I think it may have randomly passed the tests due to there being so few random tests at the time.
You are correct on the random tests, I have increased the count to 50. However, I think N is reasonable considering the complexity of the algorithm. My solution cannot reliably stay under the execution time limit when N is larger than 12000 and 100 random tests. If you know any a faster solution please let me know so I can edit the kata.
Added sample tests