174k views
5 votes
How many passes will it take to find 12 using a binary search? 8, 10, 12, 14, 16, 18, 20

1 3 4 2

User Latiffany
by
3.8k points

1 Answer

1 vote

Answer:

3 passes

Step-by-step explanation:

Binary search halves and halves an ordered list of numbers until the value being searched is found.

14 is the middle number. it is larger than 12 so we look at the left side

10 is the middle number of the left side it is smaller than 12 os we look at the right side

12 is the middle number between 10 and 14 and it is also the number we are trying to find.

User Aldous
by
3.3k points