Advanced
Greedy & Intervals
Make the locally best move and prove it never hurts: Kadane, reach-based jumping, and the sort-then-sweep toolkit for merging, scheduling and counting intervals.
0 of 3 lessons complete, 0 of 8 problems solved
Coursework
38 min
Up next
Greedy: Take the Best Move Now
The greedy choice property, the exchange argument, and how to spot when greedy fails.
12 min
Greedy Scans: Kadane and Reach
One pass with a tiny bit of state: the best subarray sum and the farthest reachable index.
11 min
Intervals: Sort, Then Sweep
Overlap tests, sort by start vs sort by end, sweep lines for peak overlap, and inserting into sorted intervals.
15 min
Practice ladder
Start with the first problem, then work toward the harder variations. Run examples before submitting against all tests.
Next unit: Tries & Bit Manipulation