0% found this document useful (0 votes)
24 views2 pages

DP Step by Step

Step by step DP roadmap.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views2 pages

DP Step by Step

Step by step DP roadmap.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

𝐃𝐲𝐧𝐚𝐦𝐢𝐜 𝐏𝐫𝐨𝐠𝐫𝐚𝐦𝐦𝐢𝐧𝐠 𝐀𝐥𝐥 𝐏𝐚𝐭𝐭𝐞𝐫𝐧𝐬 𝐏𝐫𝐞𝐩𝐚𝐫𝐚𝐭𝐢𝐨𝐧 𝐁𝐬𝐭 🔥

Pattern ->𝟏𝐃 𝐃𝐲𝐧𝐚𝐦𝐢𝐜 𝐏𝐫𝐨𝐠𝐫𝐚𝐦𝐦𝐢𝐧𝐠


1) Climbing Stairs
2) Frog Jump
3) Frog Jump with K
4) Maximum sum of Non-adjacent elements
5) House robber 2
6) Ninja's Training

Pattern -> 𝐃𝐲𝐧𝐚𝐦𝐢𝐜 𝐏𝐫𝐨𝐠𝐫𝐚𝐦𝐦𝐢𝐧𝐠 𝐎𝐧 𝐆𝐫𝐢𝐝𝐬 / 𝟐𝐃


1) Grid Unique Paths
2) Unique Paths
3) Minimum path sum in Grid
4) Tringle (Fixed Starting Point and Variable Ending Point)
5) Minimum/Maximum Falling Path Sum
6) Cherry Pickup 2

Pattern -> 𝐃𝐲𝐧𝐚𝐦𝐢𝐜 𝐏𝐫𝐨𝐠𝐫𝐚𝐦𝐦𝐢𝐧𝐠 𝐎𝐧 𝐒𝐮𝐛𝐬𝐞𝐭𝐬 / 𝐒𝐮𝐛𝐬𝐞𝐪𝐮𝐞𝐧𝐜𝐞


1) Subset Sum Equals to Target
2) Partition Equals Subset Sum
3) Partition A subset into 2 subset with minimum absolute sum diff.
4) Count Subsets With Sum K
5) Count Partitions with given difference
6) 0/1 Knapsack
7) Minimum Coins
8) Target Sum
9) Coin Change 2
10) Unbounded Knapsack 1 D array
11) Rod Cutting 1 D array

Pattern -> 𝐃𝐲𝐧𝐚𝐦𝐢𝐜 𝐏𝐫𝐨𝐠𝐫𝐚𝐦𝐦𝐢𝐧𝐠 𝐎𝐧 𝐒𝐭𝐫𝐢𝐧𝐠𝐬


1) Print Length Of Longest Common Subsequence
2) Print Longest Common Subsequence
3) Longest Palindromic Subsequence
4) Minimum Insertion to Make String Palindrome
5) Minimum Insertions/Deletions to Convert String A -> B
6) Shortest Common SuperSequence
7) Distinct Subsequence
8) Edit Distance
9) Wildcard Matching

Pattern -> 𝐃𝐲𝐧𝐚𝐦𝐢𝐜 𝐏𝐫𝐨𝐠𝐫𝐚𝐦𝐦𝐢𝐧𝐠 𝐎𝐧 𝐒𝐭𝐨𝐜𝐤𝐬


1) Best Time To Buy and Sell Stock (Buy Ones & Sell Ones )
1) Best Time To Buy and Sell Stock 2 (Unlimited Time Buy & Sell)
1) Best Time To Buy and Sell Stock 3 ( At Max 2 Times Buy & Sell)
1) Best Time To Buy and Sell Stock 4 (K times Buy & Sell )
1) Best Time To Buy and Sell Stock 5 (Buy & Sell With Cooldown)
1) Best Time To Buy and Sell Stock 6 (Buy & Sell With Extra Fee)

Pattern -> 𝐃𝐲𝐧𝐚𝐦𝐢𝐜 𝐏𝐫𝐨𝐠𝐫𝐚𝐦𝐦𝐢𝐧𝐠 𝐎𝐧 𝐋𝐨𝐧𝐠𝐞𝐬𝐭 𝐈𝐧𝐜𝐫𝐞𝐚𝐬𝐢𝐧𝐠 𝐒𝐮𝐛𝐬𝐞𝐪𝐮𝐞𝐧𝐜𝐞 (LIS)


1) Print Length Of Longest Increasing Subsequence
2) Print Longest Increasing Subsequence
3) Largest Divisible Subset
4) Longest String chain
5) Longest Bitonic Subsequence
6) Number Of Longest Increasing Subsequence

Pattern -> 𝐇𝐚𝐫𝐝𝐞𝐬𝐭 𝐃𝐲𝐧𝐚𝐦𝐢𝐜 𝐏𝐫𝐨𝐠𝐫𝐚𝐦𝐦𝐢𝐧𝐠 𝐎𝐧 𝐩𝐚𝐫𝐭𝐢𝐭𝐢𝐨𝐧


1) Matrix Chain Multiplication
2) Minimum Cost To cut The Stick
3) Burst Balloons
4) Evaluate Boolean
5) Palindrome Partitioning 2
6) Partition Array For Maximum Sum
7) Maximum Rectangle Area with all 1's (Dp on Rectangle)
8) Count Square Submatrices with all ones (Dp on Rectangle)

"𝐈 𝐓𝐡𝐢𝐧𝐤 𝐓𝐡𝐞𝐬𝐞 𝐀𝐥𝐥 𝐐𝐮𝐞𝐬𝐭𝐢𝐨𝐧𝐬 𝐀𝐫𝐞 𝐄𝐧𝐨𝐮𝐠𝐡 𝐓𝐨 𝐌𝐚𝐬𝐭𝐞𝐫𝐢𝐧𝐠 𝐃𝐲𝐧𝐚𝐦𝐢𝐜 𝐩𝐫𝐨𝐠𝐫𝐚𝐦𝐦𝐢𝐧𝐠"

You might also like