Dynamic Programming • Beginner • 15 min
Climbing Stairs
How to notice the recurrence from the last two choices and use that as an entry point to dynamic programming.
Practice problems with walkthroughs, hints, and solutions.
Filter by type or level
Dynamic Programming • Beginner • 15 min
How to notice the recurrence from the last two choices and use that as an entry point to dynamic programming.
Dynamic Programming • Intermediate • 25 min
How to move away from blind combinations and build a DP that searches for the minimum cost for each value up to the target.
Dynamic Programming • Intermediate • 18 min
How to model the choice between robbing or skipping each house while respecting the adjacency constraint.
Dynamic Programming • Intermediate • 22 min
How to turn string segmentation into prefix [dynamic programming](/glossary/dynamic-programming) instead of retrying the same cut over and over.
Dynamic Programming • Intermediate • 25 min
How to turn comparison between two strings into a table of subproblems instead of repeating [recursion](/glossary/recursion) choices.
Dynamic Programming • Intermediate • 22 min
How to start from [O(n²)](/glossary/o-n-squared) [dynamic programming](/glossary/dynamic-programming) and reach the idea of smallest possible endings with [binary search](/glossary/binary-search).