AdYobe uses essential cookies to keep the site working. With your permission, optional cookies may also be used to improve your experience.
Read our Cookie Policy and Privacy Policy.
Easy steps to learn Dynamic Programming
Sorry, The owner of the requested video does not allow it to be played in embedded players.
The playback problem has been reported for administrator review. The video has not been disabled automatically.
Sorry,
We dont allow you to watch multiple videos at the same time.
5 Simple Steps for Solving Dynamic Programming Problems
Dynamic Programming (DP) is an algorithmic technique for solving an optimization problem by breaking it down into simpler subproblems and utilizing the fact that the optimal solution to the overall problem depends upon the optimal solution to its subproblems.
In this video, we go over five steps that you can use as a framework to solve dynamic programming problems. You will see how these steps are applied to two specific dynamic programming problems: the longest increasing subsequence problem and optimal box stacking. The five steps in order are as follows:
1. Visualize examples
2. Find an appropriate subproblem
3. Find relationships among subproblems
4. Generalize the relationship
5. Implement by solving subproblems in order
After taking an in depth look at these problems, at the end of the video we will also have a discussion about common subproblems that you may encounter while solving dynamic programming problems.
Error correction: for the box problem, using dictionary solutions only works if we are given unique boxes -- using a list of subproblems would be a better way to solve it if we wanted to handle duplicate boxes (similar to how we did the longest increasing subsequence).