Binary Search Algorithm

How it Works

  1. It finds the middle element of the array and compares it to the key
  2. If it isn't equal, the half that is either higher or lower than the key is eliminated from the search
  3. Repeat the previous steps until the key is found or isn't in the array

Additional Help to Understand Binary Search