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.
Actually, the recursion algorithm is the slowest, ~ O(2^n). The best solution would be O(n), huge difference.
There is one thing that the author forgets to mention is that whether there will be ** multiple while loops **.
I check the ranking first solution, the problem with that is something like
will cause the problem.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I got the same issue and I just don't understand how come the result would be the same as the input. It's ridiculout!
This is not a pure function.