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.
bouncingBall(300, 0.99, 1.5)
PHP Fatal error: Uncaught Error: Maximum function nesting level of '256' reached, aborting!
Opps, yeah thanks haha :)
that's called
O(1)
, then ;)This comment is hidden because it contains spoiler information about the solution
This is recursion. Easy but never thought about it lol.
that was my first idea but then I decided to use preg_match_all since it returns the number of matches and there is an 'i' modifier.
what +2 mean ? where can i read it ?
really cool!
Thanks! ;)
Cool, as i written my code i didn't knew how i can ged rid of a while-cycle. Your recursion-Solution is much elegant for this case. I have forked your solution and written it shorter, with just one return and better readable condition :)
nice and concise!
Thanks! ;)
Clean as f
Gutted I missed the seemingly obvious recursive nature of this function! Good job.
No worries, it is ok :)
Loading more items...