Describe the differences between a binary and linear search algorithm.

The binary and linear search algorithms describe two methods of finding a particular item in a list. They both have strengths in terms of how fast they are, but this depends on what type of list you are searching through. If you are given an unordered list of contact details and you need to find a particular person, you would use the linear search method. You can not be too sure of where that person lies in the list and so you would start right at the beginning, checking each name and number in turn until you find the right one. However if you are presented with an ordered list, such as a phonebook, you can use the binary search algorithm. We start by checking right in the middle. As the list is ordered, we know which half of the phonebook to disregard. This is repeated, continuously disregarding sections of the phonebook until we find the number we want. Providing you have an ordered list, binary search would be the quickest search algorithm to use. If the list is unordered, the algorithm will be ineffective.

Answered by Jack E. Computing tutor

1303 Views

See similar Computing GCSE tutors

Related Computing GCSE answers

All answers ▸

State the denary representation of the binary number 10010111


What is an algorithm?


In terms of programming software, what is a translator? Describe the differences between the following three translators: assembler, compiler, interpreter.


What is Big Data


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