Thursday, December 03, 2020

Types of Dynamic Programming

For coding interviews, the most common types of DP problems are: 1. Knapsack - 0-1 - Bounded - Unbounded 2. LCS 3. LIS 4. Matrix chain multiplication 5. DP on grid 6. Kadane's algorithm etc Advanced Dynamic Programming 1. Kth lexicographical string 2. DP on Tree 3. DP + bitmasking 4. DP + BIT/Segment tree 5. DP + convex hull Mostly, this is for competitive programming.