2-D Dynamic Programming
17 animated solutionsTwo indices of state — usually prefixes of two strings or a grid. Edit distance, longest common subsequence and grid path sums live here. Every problem below plays as an animated walkthrough with solutions in Python, Java and C++. Companies that ask these most: Swiggy, Geico, Mastercard.
Best Time to Buy And Sell Stock With Cooldown
Coin Change II
Edit Distance
Interleaving String
Longest Common Subsequence
Maximal Square
Minimum Path Sum
Target Sum
Triangle
Unique Paths
Unique Paths II
Best Time to Buy and Sell Stock III
Best Time to Buy and Sell Stock IV
Burst Balloons
Distinct Subsequences
Longest Increasing Path In a Matrix
Regular Expression Matching