Data Structures & Algorithms using JavaScript Course
Data Structures & Algorithms using JavaScript
/
Intermediate

Binary Search

Definition

A search algorithm that finds the position of a target value within a SORTED array. It repeatedly divides the search interval in half, achieving O(log N) time.

Explain Like I'm New

Looking for a word in a dictionary by opening it to the exact middle, seeing if you went too far or not far enough, and ripping the book in half to try again.

Interactive Coding Challenges

Standard Binary Search

Solution Code

Loading...
Console output will appear here...