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.
@Chrono79 Thanks again for the help and the great resource you linked. Recursion was happening however since I did not return the recursive function the value was being lost as the recursive stack frames unwind. This was solved by simply returning the recursive function or could have also been solved by using variables declared outside of the function that's state is changed by each recursive call.
Thanks again for not giving me the answer but pointing me in the right direction.
This comment is hidden because it contains spoiler information about the solution
So how I understood it is. The h is anything greater than zero, window, where the mother is, value is changing and is greater than zero but less than h, and the ball is dropped from h.
@Chrono79, Thanks you were right. It was because I wasn’t validating all the inputs. I do not know what test case was causing the infinite loop but once I validated all the inputs it fixed the issue. My guess was there was a situation where window was less than 0 and my h value never goes below zero so it created an infinite loop.
This comment is hidden because it contains spoiler information about the solution