/ DSA with C++ / Phase 6 Phase 6 Days 28-35
Arrays: Easy to Medium to Hard A deep bag of array techniques: prefix sums, two pointers, Kadane, intervals, matrix moves
Phase Goal Build the bread-and-butter array toolkit every contest and interview leans on.
Day 28: Easy array patterns
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 29: Prefix sums & subarray sums
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 30: Kadane & the sign / rearrange family
Maximum subarray (Kadane)
Rearrange by sign & stock
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 31: Medium array classics
Next permutation & leaders
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 32: Intervals & matrix moves
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 33: Hard array problems — part 1
Merge without extra space
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 34: Hard array problems — part 2
Count inversions & reverse pairs (revisit)
Grid & consistency drills
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 35: Array capstone & mixed set
Choosing the right technique
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:
Easy array patterns Prefix sums & subarray sums Kadane & the sign / rearrange family Medium array classics Intervals & matrix moves Hard array problems — part 1 Hard array problems — part 2 Array capstone & mixed set After Phase 6, 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.