/ DSA with C++ / Phase 24 Phase 24 Days 135-140
Advanced Dynamic Programming The DP that wins contests: bitmask, digit, tree rerooting, SOS, and optimizations
Phase Goal Layer the advanced DP families on top of the core, and recognize each from its constraints.
Day 135: Bitmask DP
Practice, delayed recall, and independent transfer Choose one core problem from LeetCode, Codeforces, AtCoder, or CSES after checking its prerequisites; hide its technique label Spend 10–20 minutes retrieving one earlier mechanism and one earlier bug before new work; prioritize weak prerequisites Use a five-task bank: guided warm-up, core, changed constraint, delayed recall, optional stretch; attempt one or two, not all five on a timer Before a solution, produce a trace or brute-force plan; when stuck take one hint, act on it, then reassess Record help used, the failing input, the corrected reasoning, and a next review date; start around 1/3/7/14/30 days and adapt Reserve a weekly mixed review; after foundation readiness add a short virtual contest and upsolve one task with known prerequisites Prove progress through a delayed blank-editor reconstruction and a changed problem; a same-day quiz is supporting evidence only
Day 136: SOS DP & subset-sum-over-subsets
Practice, delayed recall, and independent transfer Choose one core problem from LeetCode, Codeforces, AtCoder, or CSES after checking its prerequisites; hide its technique label Spend 10–20 minutes retrieving one earlier mechanism and one earlier bug before new work; prioritize weak prerequisites Use a five-task bank: guided warm-up, core, changed constraint, delayed recall, optional stretch; attempt one or two, not all five on a timer Before a solution, produce a trace or brute-force plan; when stuck take one hint, act on it, then reassess Record help used, the failing input, the corrected reasoning, and a next review date; start around 1/3/7/14/30 days and adapt Reserve a weekly mixed review; after foundation readiness add a short virtual contest and upsolve one task with known prerequisites Prove progress through a delayed blank-editor reconstruction and a changed problem; a same-day quiz is supporting evidence only
Day 137: Digit DP
Counting numbers with a property
Practice, delayed recall, and independent transfer Choose one core problem from LeetCode, Codeforces, AtCoder, or CSES after checking its prerequisites; hide its technique label Spend 10–20 minutes retrieving one earlier mechanism and one earlier bug before new work; prioritize weak prerequisites Use a five-task bank: guided warm-up, core, changed constraint, delayed recall, optional stretch; attempt one or two, not all five on a timer Before a solution, produce a trace or brute-force plan; when stuck take one hint, act on it, then reassess Record help used, the failing input, the corrected reasoning, and a next review date; start around 1/3/7/14/30 days and adapt Reserve a weekly mixed review; after foundation readiness add a short virtual contest and upsolve one task with known prerequisites Prove progress through a delayed blank-editor reconstruction and a changed problem; a same-day quiz is supporting evidence only
Day 138: DP on trees — rerooting
Practice, delayed recall, and independent transfer Choose one core problem from LeetCode, Codeforces, AtCoder, or CSES after checking its prerequisites; hide its technique label Spend 10–20 minutes retrieving one earlier mechanism and one earlier bug before new work; prioritize weak prerequisites Use a five-task bank: guided warm-up, core, changed constraint, delayed recall, optional stretch; attempt one or two, not all five on a timer Before a solution, produce a trace or brute-force plan; when stuck take one hint, act on it, then reassess Record help used, the failing input, the corrected reasoning, and a next review date; start around 1/3/7/14/30 days and adapt Reserve a weekly mixed review; after foundation readiness add a short virtual contest and upsolve one task with known prerequisites Prove progress through a delayed blank-editor reconstruction and a changed problem; a same-day quiz is supporting evidence only
Day 139: DP optimizations
Practice, delayed recall, and independent transfer Choose one core problem from LeetCode, Codeforces, AtCoder, or CSES after checking its prerequisites; hide its technique label Spend 10–20 minutes retrieving one earlier mechanism and one earlier bug before new work; prioritize weak prerequisites Use a five-task bank: guided warm-up, core, changed constraint, delayed recall, optional stretch; attempt one or two, not all five on a timer Before a solution, produce a trace or brute-force plan; when stuck take one hint, act on it, then reassess Record help used, the failing input, the corrected reasoning, and a next review date; start around 1/3/7/14/30 days and adapt Reserve a weekly mixed review; after foundation readiness add a short virtual contest and upsolve one task with known prerequisites Prove progress through a delayed blank-editor reconstruction and a changed problem; a same-day quiz is supporting evidence only
Day 140: Advanced DP recap
Practice, delayed recall, and independent transfer Choose one core problem from LeetCode, Codeforces, AtCoder, or CSES after checking its prerequisites; hide its technique label Spend 10–20 minutes retrieving one earlier mechanism and one earlier bug before new work; prioritize weak prerequisites Use a five-task bank: guided warm-up, core, changed constraint, delayed recall, optional stretch; attempt one or two, not all five on a timer Before a solution, produce a trace or brute-force plan; when stuck take one hint, act on it, then reassess Record help used, the failing input, the corrected reasoning, and a next review date; start around 1/3/7/14/30 days and adapt Reserve a weekly mixed review; after foundation readiness add a short virtual contest and upsolve one task with known prerequisites Prove progress through a delayed blank-editor reconstruction and a changed problem; a same-day quiz is supporting evidence only
After this phase, you'll be able to:
Bitmask DP SOS DP & subset-sum-over-subsets Digit DP DP on trees — rerooting DP optimizations Advanced DP recap After Phase 24, explain a core invariant, reconstruct a solution after a delay, diagnose a bug, and solve one unlabelled variation. Repair a failed prerequisite before advancing; record help separately from independent work.