Hi All,
I just completed my DP adventure which I started in last June and I would like to share my findings in this post.
There are total 241 dp tagged problems in LeetCode as of Today, and 26 of them are locked so I only solved the public ones.
The followings are my categorization of the all 215 DP problems. (In each category, problems are sorted by LeetCode difficulty)
Table version of the list: https://chuka231.blogspot.com/2021/01/leetcode-all-dynamic-programming.html
| 9.Probability DP |
|---|
| https://leetcode.com/problems/soup-servings/ |
| https://leetcode.com/problems/new-21-game/ |
| https://leetcode.com/problems/airplane-seat-assignment-probability/ |
B.LCS
https://leetcode.com/problems/longest-palindromic-substring/
https://leetcode.com/problems/longest-palindromic-subsequence/
https://leetcode.com/problems/maximum-length-of-repeated-subarray/
https://leetcode.com/problems/longest-common-subsequence/
https://leetcode.com/problems/regular-expression-matching/
https://leetcode.com/problems/wildcard-matching/
https://leetcode.com/problems/edit-distance/
https://leetcode.com/problems/interleaving-string/
https://leetcode.com/problems/shortest-common-supersequence/
https://leetcode.com/problems/minimum-insertion-steps-to-make-a-string-palindrome/
https://leetcode.com/problems/max-dot-product-of-two-subsequences/
C.LIS
https://leetcode.com/problems/longest-increasing-subsequence/
https://leetcode.com/problems/number-of-longest-increasing-subsequence/
https://leetcode.com/problems/russian-doll-envelopes/
https://leetcode.com/problems/delete-columns-to-make-sorted-iii/
https://leetcode.com/problems/minimum-number-of-removals-to-make-mountain-array/
https://leetcode.com/problems/maximum-height-by-stacking-cuboids/
https://leetcode.com/problems/make-array-strictly-increasing/
D.2D Grid Traversal
https://leetcode.com/problems/unique-paths/
https://leetcode.com/problems/unique-paths-ii/
https://leetcode.com/problems/minimum-path-sum/
https://leetcode.com/problems/maximum-non-negative-product-in-a-matrix/
https://leetcode.com/problems/where-will-the-ball-fall/
https://leetcode.com/problems/dungeon-game/
https://leetcode.com/problems/cherry-pickup/
https://leetcode.com/problems/number-of-paths-with-max-score/
https://leetcode.com/problems/cherry-pickup-ii/
https://leetcode.com/problems/kth-smallest-instructions/
E.Cumulative Sum
https://leetcode.com/problems/range-sum-query-immutable/
https://leetcode.com/problems/maximal-square/
https://leetcode.com/problems/range-sum-query-2d-immutable/
https://leetcode.com/problems/largest-plus-sign/
https://leetcode.com/problems/push-dominoes/
https://leetcode.com/problems/largest-1-bordered-square/
https://leetcode.com/problems/count-square-submatrices-with-all-ones/
https://leetcode.com/problems/matrix-block-sum/
https://leetcode.com/problems/maximum-points-you-can-obtain-from-cards/
https://leetcode.com/problems/count-submatrices-with-all-ones/
https://leetcode.com/problems/ways-to-make-a-fair-array/
https://leetcode.com/problems/maximal-rectangle/
https://leetcode.com/problems/max-sum-of-rectangle-no-larger-than-k/
https://leetcode.com/problems/super-washing-machines/
https://leetcode.com/problems/maximum-sum-of-3-non-overlapping-subarrays/
https://leetcode.com/problems/number-of-submatrices-that-sum-to-target/
https://leetcode.com/problems/get-the-maximum-score/
F.Hashmap (SubArray)
https://leetcode.com/problems/continuous-subarray-sum/
https://leetcode.com/problems/find-two-non-overlapping-sub-arrays-each-with-target-sum/
https://leetcode.com/problems/maximum-number-of-non-overlapping-subarrays-with-sum-equals-target/
| 12.Insertion DP |
|---|
| https://leetcode.com/problems/k-inverse-pairs-array/ |
| 13.Graph DP |
|---|
| https://leetcode.com/problems/cheapest-flights-within-k-stops/ |
| https://leetcode.com/problems/find-the-shortest-superstring/ |
| 15.Binary Lifting |
|---|
| https://leetcode.com/problems/kth-ancestor-of-a-tree-node/ |