ryker0224 ryker0224
  • 15-04-2021
  • Computers and Technology
contestada

How many passes will it take to find 12 using a binary search? 8, 10, 12, 14, 16, 18, 20
1 3 4 2

Respuesta :

BigBubble
BigBubble BigBubble
  • 22-04-2021

Answer:

3 passes

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.

Answer Link

Otras preguntas

I NEED HELP ( WILL GET BRAINLYIST FOR CORRECT ANSWER)
Jace Norman Is my Brother
1. Sarah went to dinner, and the bill was $15.25. She left a 15% tip. How much money did she leave rounded to the nearest penny?
#3 Solve using graphical method Y=x+6 Y=X-2
I need the answer to number 13
Find the average in this list of numbers: -20, 15, 30, -45
Why have many family farms in North America been replaced by agribusiness farms since the 1980s?
how to distribute this problem: (x-8)^2 + 16
Which question did the supreme court evaluate in McCulloch v. Maryland?
Which set of ordered pairs represents y as a function of X? A {(-3,-1), (2, -1),(5,2)} ® {(-3,-1), (2, 2), (-3,2)} © {(-3,-1),(5,2), (-3,2)} D {(-3,-1), (2, 2),