155k views
1 vote
Consider this list of numbers: 9 3 6 8 4 7. Why are they not suitable for a binary search?

User Confusion
by
7.4k points

1 Answer

5 votes

The proved list of numbers is not suitable for a binary search because the list is not sorted in ascending order.

Binary search is an efficient algorithm for finding an item from a sorted list of items. It works by repeatedly dividing in half the portion of the list that could contain the item, until you've narrowed down the possible locations to just one.

User AkaRem
by
7.5k points