Math Fundamentals18 sections · 814 units
Open in Course

Problem - Binary Search

(Analyzing logarithmic search)

You are given a sorted array and a target value. Return the index of the target, or -1 if not found.

This is the canonical O(log n) problem. Before implementing, trace how the search space shrinks with each comparison.