Binary Search
Halving on indices, rotated arrays, and the powerful binary-search-on-the-answer trick.
0 of 6 lessons complete · 119 min total
- Binary Search Without Off-by-OnesThe lo/hi/mid template, boundary variants (first/last occurrence), rotated arrays, and the one question that matters: which half can I safely discard?Lesson · 17 minNot completed
- The Interval CollapseO(log n) made visible.Animation · 9 minNot completed
- Binary Search on the Answer'Minimum speed so everything finishes' — guess an answer, check feasibility, halve the range.Animation · 10 minNot completed
- Practice: Search TemplatesThe classic template, flattened-matrix indexing, and feasibility search on rates.easymedium×23 problems · 0 solvedPractice · 30 minNot completed
- Practice: Rotations & PartitionsDeciding which half is sorted, timestamped lookups, and the partition-based median.medium×3hard4 problems · 0 solvedPractice · 45 minNot completed
- Binary Search CheckpointBoundary conditions, rotated-array logic, and spotting minimize-the-maximum phrasing.Checkpoint · 8 minNot completed