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.
Lol, I tried my best to have the shortest answer possible and I almost went with this solution...
The rescue is really handy there!
Nope, this is not O(n^2). Just O(n) with a large coefficient (36, when corrected for digits).
Could you explain how this is O(n^2)?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
But its less readable. Nice trade to discuss hahaha
I feel so outmatched right about now
clever-girl.gif
My advice is to break the while statemnt over several lines and add a statement that displays the result of each iteration. The patterns show what happens.
To answer the question: true until there is nothing left to replace. Then it ends.
This comment is hidden because it contains spoiler information about the solution
I can't parse line 3. What's the condition that 'while' is checking, and what code does it execute if true?
This is amazing solution. First time in CW I meat
rescue
. I'll save this snippet. Great. Thank youYou don't need the return here :)
This comment is hidden because it contains spoiler information about the solution
Loading more items...