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

1659 Views

See similar Computing GCSE tutors

Related Computing GCSE answers

All answers ▸

Convert the following binary number into hexadecimal : 10111000


How is memory used in a computer system?


What is SQL? I know it's a 'query' language, but what does that mean?


What is the difference between a compiler and an interpreter?


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
Cookie Preferences