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.
But is it a simple loop? I've done it a thousand times and it's always been fine. And then suddenly it started like this
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
what is the faster solution? coz mine is basically yours but it took 7k seconds to run lol.
Thanks for wise advice
This comment is hidden because it contains spoiler information about the solution
The square brackets aren't needed. And using them creates a list that makes your solution O(n) in space when can be solved in O(1) space.
Ha, it was the only solution since apparently I don't know Python well enough to get by for a simple 6kyu :)