Describe the process of a binary search.

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.

Answered by Michael T. Computing tutor

2206 Views

See similar Computing A Level tutors

Related Computing A Level answers

All answers ▸

One member of a chess club sends a text file saved in Unicode. What meant by the term "Unicode" and why might this be necessary?


Write a small program, in pseudocode or otherwise, that demonstrates a recursive algorithm. Write a small explanation of how recursion is used in your program.


Express the number 208 as a) an 8-bit binary number b) an octal string c) a hexadecimal string


Basic Conversions (Binary, Hexadecimal, etc)


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2024

Terms & Conditions|Privacy Policy