Describe the process of a binary search.

  • Google+ icon
  • LinkedIn icon

A binary search requires a ordered list. The search first finds the data entry in the middle of the list, and checks whether it is larger or smaller than the data it is looking for. It then removed half the list creating a sublist. The process will repeat until the data it checks is equal to the data it is searching for.

Eg: "1 2 4 5 6 7 10" and we are searching for 6

First look at middle number "5" which is smaller than 6 so we remove that half of the list leaving "6 7 10" then we look at 7 which is larger than 5, so we remove that half of the list leaving "6" we then check 6 and have found the number we were looking for.

Michael T. A Level Maths tutor, GCSE Maths tutor, A Level Computing t...

About the author

is an online A Level Computing tutor with MyTutor studying at Durham University

Still stuck? Get one-to-one help from a personally interviewed subject specialist.

95% of our customers rate us

Browse tutors

We use cookies to improve your site experience. By continuing to use this website, we'll assume that you're OK with this. Dismiss