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

1857 Views

See similar Computing GCSE tutors

Related Computing GCSE answers

All answers ▸

What do 0s and 1s have anything to do with Boolean Logic?


What is two's complement, and how do I calculate it?


What is an algorithm?


how do you convert binary to a form in which you can perform subtraction?


We're here to help

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