https://refdash.com
We will dig into a few concrete dynamic programming problems and speak about the steps that you should take when solving them. The session will be a good opportunity for everyone to consolidate their understanding of dynamic programming.
PROBLEM STATEMENT:
Do you know what hippity hop is?
For those who don't know, here is a short video:
• Hippity Hop Race
Now in this problem, we're on this crazy jumping ball, trying to stop, while
avoiding spikes along the way.
Here are the rules:
1) You're given a flat runway with a bunch of spikes in it. The runway is
represented by a boolean array which indicates if at a particular (discrete)
spot there is clear of spikes. It is True for clear and False for not clear.
2) You're given a starting speed. A speed at any given point indicates how
much you will move in the X direction with the next jump.
3) Every time you land on a spot, you can adjust your speed by up to 1 unit
before the next jump.
4) You want to safely stop anywhere along the runway. However, if you land on a
spike, your crazy bouncing ball bursts and it's game over.
Find a path to a stopping point along with actions that we need to take at each
of the landing spots.
__ _| __ ___ ___ _| __ ___ _| ___ ___
True False True True True False True True False True True
On this page of the site you can watch the video online Refdash Demystifying Interviews - Dynamic Programming with a duration of hours minute second in good quality, which was uploaded by the user Refdash 01 January 1970, share the link with friends and acquaintances, this video has already been watched 2,557 times on youtube and it was liked by 49 viewers. Enjoy your viewing!