Binary search revision notes

Maintain a half-open interval [lo, hi). For a lower bound, move lo to mid + 1 when the middle value is smaller than the target. Otherwise move hi to mid. The final lo is the insertion position.

Section
Study materials
Kind
Notes
Subject
Algorithms
Subtopic
Binary search
Difficulty
Beginner