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.
I considered using recursion, but I later ended up with loop.
using recursion a great solution!!!
a clever use of the -1 return, it took me a second to catch up
aha! I was confused as to why the problem wanted you to return -1, now I can see that it sets you up for this solution...
Just clever!!
This comment is hidden because it contains spoiler information about the solution
thats so elegant
This was my first solution, but I kept getting stack overflows because I forgot <=
Love it
reducing/recursing the height by multiplying with bounce and leaving the rest to the conditions... what a clever mind..
I spent such a long time trying to create a recursive function but ended up going the good old iterative way with a while loop.
Thank you for this! Smart
Strange that this answer is so far down. It seems like a classic recursion coding problem.
morevoer, asking for a string instead of the boolean makes no sense and that's a duplicate.
& looks faster than %