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

1247 Views

See similar Computing GCSE tutors

Related Computing GCSE answers

All answers ▸

What is Control Flow in a Computer Program?


Explain some advantages and disadvantages of having your computer connected to a network


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


Convert -58 into 8bit twos compliment binary


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–2025

Terms & Conditions|Privacy Policy
Cookie Preferences