Tier 4 — Quy hoạch động (DP)

8 lesson: kỹ thuật giải bài toán tối ưu/đếm bằng cách lưu kết quả bài con chồng lấp.

Tier này dạy gì?

Quy hoạch động (Dynamic Programming) là kỹ thuật khó nhất nhưng mạnh nhất: giải bài toán bằng cách chia thành bài con chồng lấp và lưu kết quả (memoization/tabulation). Tier này đi từ DP 1 chiều đến DP trên cây, bitmask, và tối ưu DP.

Tiền đề: Tier 0 (đệ quy), Tier 2 (D&C), Tier 3 (greedy vs DP).

8 lesson trong Tier 4
Lesson 23
Memoization vs tabulation, thiết kế state, overlapping subproblems, optimal substructure.
Lesson 24
Climbing stairs, house robber, Kadane (max subarray), decode ways.
Lesson 25
0/1 knapsack, unbounded, subset sum, partition equal sum, coin change.
Lesson 26
LCS, edit distance, unique paths, min path sum, longest common substring.
Lesson 27
Matrix chain multiplication, palindrome partition, burst balloons.
Lesson 28
Tree DP, rerooting technique, tree diameter, house robber III.
Lesson 29
TSP (traveling salesman), assignment problem, subset enumeration.
Lesson 30
Space optimization, monotonic deque, prefix optimization, convex hull trick (intro).