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.

WH
Answered by William H. Computing tutor

1261 Views

See similar Computing GCSE tutors

Related Computing GCSE answers

All answers ▸

How would 12 be represented in binary?


How to convert any binary number to decimal?


What is the purpose of RAM?


Compress the following bit pattern using RLE (Run Length Encoding). 1111 0011 1100 0000


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