Describe the process used by a binary search algorithm, and explain why binary search would not be appropriate for the list [3,2,5,7,9]

A binary search starts at the middle of the list and compares this item with the search term, if the item matches the search term, then the search is complete.If the item is not the search term, it is compared with the search term and the list is split in half either above the middle item (if the item is lower than the search term) or below the middle item (if the item is greater than the search term)The search then repeats with this new list until the data item is found, or the list size is 1, and the item is not the search term, at which point the search concludes that the search term is not present in the list.The list given would not be appropriate as binary search only works for ordered lists.

Answered by William H. Computing tutor

1110 Views

See similar Computing GCSE tutors

Related Computing GCSE answers

All answers ▸

What is stepwise refinement in top down programming?


Show how you would calculate 53 + 39 in 8-bit binary?


What is the purpose of RAM in a computer?


Storage: Magnetic hard disc vs Solid state drive.


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