Fiveable
Fiveable

Binary Search Method

Definition

A binary search method is a searching algorithm that divides a sorted list into two halves and repeatedly compares the middle element of each half to the target value, eliminating half of the remaining elements with each comparison until the target value is found or determined to be not in the list.

Analogy

Imagine you have a deck of cards with numbers from 1 to 100. You want to find a specific card without going through every single card. Instead, you divide the deck in half and check if your card is in the first or second half. Then, you repeat this process by dividing that half again until you find your card or determine it's not in the deck.

Related terms

Sorted List: A sorted list is an ordered collection of elements where each element is arranged in ascending or descending order.

Searching Algorithm: A searching algorithm is a step-by-step procedure used to locate specific data within a given set of data.

Target Value: The target value refers to the value being searched for within a dataset.

"Binary Search Method" appears in:

collegeable - rocket pep

Are you a college student?

  • Study guides for the entire semester

  • 200k practice questions

  • Glossary of 50k key terms - memorize important vocab



© 2024 Fiveable Inc. All rights reserved.

AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.


© 2024 Fiveable Inc. All rights reserved.

AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.