Skip to content

Commit 84dfdef

Browse files
committed
update DP
1 parent c742922 commit 84dfdef

File tree

1 file changed

+18
-23
lines changed

1 file changed

+18
-23
lines changed

✅ Pattern 15: 0-1 Knapsack (Dynamic Programming).md

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ console.log(`7th Fibonacci is ---> ${calculateFibonacci(7)}`);
117117
Let’s apply this knowledge to solve some of the frequently asked <b>DP</b> problems.
118118

119119
# Pattern 1: 0/1 Knapsack
120-
<b>Problem Set</b>
120+
## Problem Set
121121

122122
[🔎 0/1 Knapsack](#🔎-01-knapsack-medium)
123123

@@ -1550,7 +1550,7 @@ console.log(
15501550
```
15511551

15521552
# Pattern 2: Unbounded Knapsack
1553-
<b>Problem Set</b>
1553+
## Problem Set
15541554

15551555
[Unbounded Knapsack](#unbounded-knapsack)
15561556

@@ -2520,7 +2520,7 @@ console.log(
25202520
- The above solution has time and <b>space complexity</b> of `O(L*N)`, where `L` represents total ribbon lengths and `N` is the total length that we want to cut.
25212521
25222522
# Pattern 3: Fibonacci Numbers
2523-
<b>Problem Set</b>
2523+
## Problem Set
25242524
25252525
[Fibonacci numbers](#fibonacci-numbers)
25262526
@@ -3307,7 +3307,7 @@ We can clearly see that this problem follows the <b>[Fibonacci number pattern](#
33073307
33083308
33093309
# Pattern 4: Palindromic Subsequence
3310-
<b>Problem Set</b>
3310+
### Problem Set
33113311
33123312
[Longest Palindromic Subsequence](#longest-palindromic-subsequence)
33133313
@@ -4253,33 +4253,28 @@ console.log(`Minimum palindrome partitions ---> ${findMPPCuts('madam')}`);
42534253
- The <b>time and space complexity</b> of the above algorithm is `O(n²)`, where `n` is the length of the input string.
42544254
42554255
# Pattern 5: Longest Common Substring
4256-
### Problem Set
4257-
4258-
[Longest Common Substring](#longest-common-substring)
4259-
4260-
[🔎 Longest Common Subsequence](#🔎-longest-common-subsequence)
4261-
4262-
[Minimum Deletions & Insertions to Transform a String into another](#minimum-deletions--insertions-to-transform-a-string-into-another)
4263-
4264-
[👩🏽‍🦯 🔎 Longest Increasing Subsequence](#👩🏽‍🦯-🔎-longest-increasing-subsequence)
4265-
4266-
[Maximum Sum Increasing Subsequence](#maximum-sum-increasing-subsequence)
4256+
## Problem Set
42674257
4268-
[Shortest Common Super-sequence](#shortest-common-super-sequence)
4258+
1. [Longest Common Substring](#longest-common-substring)
4259+
2. [🔎 Longest Common Subsequence](#🔎-longest-common-subsequence)
4260+
3. [Minimum Deletions & Insertions to Transform a String into another](#minimum-deletions--insertions-to-transform-a-string-into-another)
4261+
4. [👩🏽‍🦯 🔎 Longest Increasing Subsequence](#👩🏽‍🦯-🔎-longest-increasing-subsequence)
4262+
5. [Maximum Sum Increasing Subsequence](#maximum-sum-increasing-subsequence)
4263+
6. [Shortest Common Super-sequence](#shortest-common-super-sequence)
42694264
4270-
[Minimum Deletions to Make a Sequence Sorted](#minimum-deletions-to-make-a-sequence-sorted)
4265+
7. [Minimum Deletions to Make a Sequence Sorted](#minimum-deletions-to-make-a-sequence-sorted)
42714266
4272-
[Longest Repeating Subsequence](#longest-repeating-subsequence)
4267+
8. [Longest Repeating Subsequence](#longest-repeating-subsequence)
42734268
4274-
[Subsequence Pattern Matching](#subsequence-pattern-matching)
4269+
9. [Subsequence Pattern Matching](#subsequence-pattern-matching)
42754270
4276-
[Longest Bitonic Subsequence](#longest-bitonic-subsequence)
4271+
10. [Longest Bitonic Subsequence](#longest-bitonic-subsequence)
42774272
4278-
[Longest Alternating Subsequence](#longest-alternating-subsequence)
4273+
11. [Longest Alternating Subsequence](#longest-alternating-subsequence)
42794274
4280-
[🔎 Edit Distance](#🔎-edit-distance)
4275+
12. [🔎 Edit Distance](#🔎-edit-distance)
42814276
4282-
[🔎 Strings Interleaving](#🔎-strings-interleaving)
4277+
13. [🔎 Strings Interleaving](#🔎-strings-interleaving)
42834278
42844279
42854280
## Longest Common Substring

0 commit comments

Comments
 (0)