Loading...
Loading...
Loading Curriculum...
Loading Subject...
Loading Topic...
Loading Lesson...
Loading Lab...
Binary Search is a highly efficient algorithm for finding an item from a sorted list of items. It works by repeatedly halving the search interval.
Never use `(low + high) / 2` because it can overflow if `low + high` exceeds the maximum integer value. Always use `low + (high - low) / 2`.