Dynamic-Programming-Questions-by-Aditya-Verma
Dynamic-Programming-Questions-by-Aditya-Verma copied to clipboard
Aditya Verma (Youtube) DP Playlist Codes/Solutions.
Dynamic-Programming-Questions-by-Aditya-Verma
Codes of all questions covered by Aditya Verma in his Dynamic Programming Lectures
(Codes are tested on gfg / leetcode and are in the order of videos)
Note: Click on title of question to go to the page of code
-
0/1 Knapsack
- Knapsack Recursive
- Knapsack Memoization
- Knapsack Bottom-up
- Subset Sum Problem
- Equal Sum Partition Problem
- Count of Subsets Sum with a Given Sum
- Min Subset Sum Difference
- Count of Subsets with given diff
- Target Sum - Specific to leetcode problem
-
Unbounded Knapsack
- Rod Cutting Problem
- Coin Change - I: max number of ways
- Coin Change - II: min number of coins
-
Longest Common Subsequence (LCS)
- LCS Recursive
- LCS Memoization
- LCS Bottom - Up DP
- Longest Common Substring
- Print LCS
- Shortest Common Supersequence (SCS)
- Min # of insertion and deletion to convert a to b
- Longest Pallindromic Subsquence (LPS)
- Min Number of deletions in string to make it pallindrome
- Print SCS
- Longest Repeating Subsequence
- Sequence Pattern Matching
- Min number of insertion in a string to make string pallindrome
-
Matrix Chain Multiplication (MCM)
- MCM Recursive
- MCM Memoization
- Pallindrome Partitioning Recursive
- Pallindrome Partitioning Memoization
-
Pallindrome Partitioning Optimization -> Still Giving TLE on GFG(Will Update if found better)
- Video Link
- To Solve these problem on GFG Click Here.
- Evaluate Expression to true Recursive
-
Evaluate Expression to true Memoization: Using Map -> Giving TLE on GFG (Will Update if found better)
- Video Link
- To Solve these problem on GFG Click Here.
- Evaluate Expression to true Memoization: Using 3d Array
- Scramble String Recursive
-
Scramble String Memoization
- Video Link
- To Solve these problem on leetcode Click Here.
- Egg Dropping Problem Recursive
- Egg Dropping Problem Memoization
-
Egg Dropping Problem Memoization Optimization - As suggested in lectures
- Video Link
- To Solve these problem on GFG Click Here.
-
Egg Dropping Problem Optimization Using Concept of Binary Search - Accepted on Leetcode (Credits: Comment below video)
- To Solve these problem on leetcode Click Here.
-
DP on Trees (Direct Solutions to leetcode / gfg problems)
-
Diameter of Binary Tree
- Video Link
- To Solve these problem on leetcode Click Here.
-
Maximum path sum (from any node to any node)
- Video Link
- To Solve these problem on leetcode Click Here.
-
Maximum path sum from leaf to leaf
- Video Link
- To Solve these problem on GFG Click Here.
-
Diameter of Binary Tree