Dynamic Programming Read Discuss(20+) Courses DSA for Beginners Learn more about Dynamic Programming in DSA Self Paced Course Practice Problems on Dynamic Programming Top Quizzes on Dynamic Programming What is Dynamic Programming? Dynamic Programming is mainly an optimization over plain recursion. Wherever we see a recursive solution that has repeated calls for same inputs, we can optimize it using Dynamic Programming. The idea is to simply store the results of subproblems, so that we do not have to re-compute them when needed later. This simple optimization reduces time complexities from exponential to polynomial. For example, if we write simple recursive solution for Fibonacci Numbers, we get exponential time complexity and if we optimize it by storing solutions of subproblems, time complexity reduces to linear. Topics: Basic Concepts Advanced Concepts Standard Dynamic Programming problems Quick Links Basic Concepts: What is memoization? A Complete tutorial Introduction to Dynamic Programming – Data Structures and Algorithm Tutorials Tabulation vs Memoizatation Optimal Substructure Property Overlapping Subproblems Property How to solve a Dynamic Programming Problem ? Advanced Concepts: Bitmasking and Dynamic Programming | Set 1 Bitmasking and Dynamic Programming | Set-2 (TSP) Digit DP | Introduction Sum over Subsets | Dynamic Programming Standard problems on Dynamic Programming: Easy: Fibonacci numbers nth Catalan Number Bell Numbers (Number of ways to Partition a Set) Binomial Coefficient Coin change problem Subset Sum Problem Compute nCr % p Cutting a Rod Painting Fence Algorithm Longest Common Subsequence Longest Increasing Subsequence Longest subsequence such that difference between adjacents is one Maximum size square sub-matrix with all 1s Min Cost Path Minimum number of jumps to reach end Longest Common Substring (Space optimized DP solution) Count ways to reach the nth stair using step 1, 2 or 3 Count all possible paths from top left to bottom right of a mXn matrix Unique paths in a Grid with Obstacles Medium: Floyd Warshall Algorithm Bellman–Ford Algorithm 0-1 Knapsack Problem Printing Items in 0/1 Knapsack Unbounded Knapsack (Repetition of items allowed) Egg Dropping Puzzle Word Break Problem Vertex Cover Problem Tile Stacking Problem Box-Stacking Problem Partition Problem Travelling Salesman Problem | Set 1 (Naive and Dynamic Programming) Longest Palindromic Subsequence Longest Common Increasing Subsequence (LCS + LIS) Find all distinct subset (or subsequence) sums of an array Weighted job scheduling Count Derangements (Permutation such that no element appears in its original position) Minimum insertions to form a palindrome Wildcard Pattern Matching Ways to arrange Balls such that adjacent balls are of different types Hard: Palindrome Partitioning Word Wrap Problem The painter’s partition problem Program for Bridge and Torch problem Matrix Chain Multiplication Printing brackets in Matrix Chain Multiplication Problem Maximum sum rectangle in a 2D matrix Maximum profit by buying and selling a share at most k times Minimum cost to sort strings using reversal operations of different costs Count of AP (Arithmetic Progression) Subsequences in an array Introduction to Dynamic Programming on Trees Maximum height of Tree when any Node can be considered as Root Longest repeating and non-overlapping substring Quick Links : Learn Data Structure and Algorithms | DSA Tutorial Top 20 Dynamic Programming Interview Questions ‘Practice Problems’ on Dynamic Programming ‘Quiz’ on Dynamic Programming If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to review-team@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above. Last Updated : 26 Sep, 2023