This website is about the Binary Search Algorithm

There are three sections in this page; 1. How BSA works 2. Imagery of how BSA works 3. Link to a more in depth explanation

First section:

The Binary Search Algorithm is used to look for the index of an element in an array and works by:
  1. Comparing x with the middle element of the array(x is the number we're searching for)
  2. If x matches the middle element then return the middle index
  3. Else, if x is greater than the middle element then x must be in the right half of the array, so we recursively go to the middle of the right half
  4. Else, we recursively got to the left half of the array which means x was smaller than the middle element of the array
  5. We continously do this until the number is found (or not)

Second section:

image of how BSA works

Third secton:

Heres a website that furthur explains the Binary Search Algorithm!