maybe good?

This commit is contained in:
2024-04-28 15:58:30 +08:00
parent 1312e694c3
commit d2e87aec97
21 changed files with 3097 additions and 700 deletions

View File

@@ -211,3 +211,19 @@ Proof by contradiction
- Therefore $"LCS"(n, m) = "LCS"(n-1, m-1)::a_n$
If $a_n != b_m, "LCS"(n, m) = max("LCS"(n-1,m), "LCS"(n, m-1))$
= Tutorial 6
Greedy vs DP
= Lecture 7 Greedy
== DP Recap
- Express solutions recursively
- Small number(polynomial) of subproblems
- Huge overlap among subproblems, so recursive may take exponential time
- Compute recursive iteratively in bottom up fashion
== Greedy
Recast the problem so that only 1 subproblem needs to be solved at each step.
= Lecture 8 Amortized Analysis