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

1705 Views

See similar Computing GCSE tutors

Related Computing GCSE answers

All answers ▸

Convert the hexadecimal value 'C3' into its binary equivalent.


Describe two different functions performed by an operating system [4 marks]


Within the systems life cycle, describe what events might take place in the Analysis stage.


why don't we all program in high level languages all the time if they are so much easier?


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