Skip to content

Commit 44ed2a3

Browse files
committed
update
1 parent 278e4b7 commit 44ed2a3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Here are a few other resources that I found helpful when learning <b>Data Struct
1919
- [Run JS](https://runjs.app/) - A JavaScript playground
2020
for your desktop
2121
- [Big O CheatSheet](https://www.bigocheatsheet.com/) - Reference for <b>Big-O</b> complexities of common algorithms
22-
- [Blind 75](https://www.teamblind.com/post/New-Year-Gift---Curated-List-of-Top-75-LeetCode-Questions-to-Save-Your-Time-OaM1orEU) - For additional practice, the [Blind75 list](https://www.teamblind.com/post/New-Year-Gift---Curated-List-of-Top-75-LeetCode-Questions-to-Save-Your-Time-OaM1orEU) of interview questions is 🔥. I would approach the questions in [this order](https://www.techinterviewhandbook.org/best-practice-questions) or [create a custom Blind75 study plan](https://www.techinterviewhandbook.org/grind75)
22+
- [Blind 75](https://www.teamblind.com/post/New-Year-Gift---Curated-List-of-Top-75-LeetCode-Questions-to-Save-Your-Time-OaM1orEU) - For additional practice, the [Blind75 list](https://www.teamblind.com/post/New-Year-Gift---Curated-List-of-Top-75-LeetCode-Questions-to-Save-Your-Time-OaM1orEU) of interview questions is 🔥. I would approach the questions in [this order](https://www.techinterviewhandbook.org/best-practice-questions) or [this order](https://neetcode.io/) or [create a custom Blind75 study plan](https://www.techinterviewhandbook.org/grind75)
2323
- [Edabit](https://edabit.com/) is a great resource if you need additional <b>Javascript</b> practice before you start using <b>leetcode</b>.
2424
- [LeetCode](https://leetcode.com/problemset/all/) of course
2525
😋

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ console.log(`6th Fibonacci is ---> ${calculateFibonacci(6)}`);
112112
console.log(`7th Fibonacci is ---> ${calculateFibonacci(7)}`);
113113
```
114114

115-
<b>In this course, we will always start with a brute-force recursive solution, which is the best way to start solving any DP problem!</b> Once we have a recursive solution then we will apply Memoization and Tabulation techniques.
115+
<b>In this course, we will always start with a brute-force recursive solution, which is the best way to start solving any DP problem!</b> Once we have a recursive solution then we will apply <i>memoization</i> and Tabulation techniques.
116116

117117
Let’s apply this knowledge to solve some of the frequently asked <b>DP</b> problems.
118118

@@ -4107,7 +4107,7 @@ function findMPPCuts(str) {
41074107
dpIsPalindrome[start][end] = false;
41084108
break;
41094109
}
4110-
//use memoization to find if the remaining string is a palindrome
4110+
//use <i>memoization</i> to find if the remaining string is a palindrome
41114111
dpIsPalindrome[i] = dpIsPalindrome[i] || [];
41124112
if (i < j && typeof dpIsPalindrome[i][j] !== 'undefined') {
41134113
dpIsPalindrome[start][end] = dpIsPalindrome[i][j];
@@ -4823,7 +4823,7 @@ console.log(
48234823
// Explanation: The LIS is {-4,3,7,15}.
48244824
```
48254825
4826-
- Since our memoization array `dp[nums.length()][nums.length()]` stores the results for all the <i>subproblems</i>, we can conclude that we will not have more than `N*N` <i>subproblems</i> (where `N` is the length of the input sequence). This means that our <b>time complexity</b> will be `O(N²)`.
4826+
- Since our <i>memoization</i> array `dp[nums.length()][nums.length()]` stores the results for all the <i>subproblems</i>, we can conclude that we will not have more than `N*N` <i>subproblems</i> (where `N` is the length of the input sequence). This means that our <b>time complexity</b> will be `O(N²)`.
48274827
- The above algorithm will be using `O(N²)` <b>space</b> for the <i>memoization array</i>. Other than that we will use `O(N)` <b>space</b> for the <i>recursion call-stack</i>. So the total <b>space complexity</b> will be `O(N² + N)`, which is <i>asymptotically</i> equivalent to `O(N²)`.
48284828
48294829
### Bottom-up Dynamic Programming
@@ -4867,7 +4867,7 @@ console.log(
48674867
// Output: 4
48684868
// Explanation: The LIS is {-4,3,7,15}.
48694869
```
4870-
-The <b>time complexity</b> of the above algorithm is `O(N²)` and the <b>space complexity</b> is `O(n)`.
4870+
- The <b>time complexity</b> of the above algorithm is `O(N²)` and the <b>space complexity</b> is `O(n)`.
48714871
## Maximum Sum Increasing Subsequence
48724872
https://www.geeksforgeeks.org/maximum-sum-increasing-subsequence-dp-14/
48734873

0 commit comments

Comments
 (0)