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

Did the South had right to secede from the US?
Write your question here (Keep it simple and clear to get the best answer) explain the importance of the media in democratic country such as south Africa. menti
A disadvantage of solar energy is the need for _____
Emma uses a 250 meter roll of crepe paper to make streamers. how many dekameters of crepe paper does Emma use
what thoughts are in the middle section of the declaration of independence
which is greater 0.55 or 2/5 or 0.46
The sequence of an mRNA transcript is UGGCACUCCAG. What will be the sequence of the template DNA strand from which it was synthesized? A.UGGCACUCCAG B.ACCGTGAGG
Fats are considered one of the six essential nutrients needed by your body. true or false
which verbal statement is true
Emma uses a 250 meter roll of crepe paper to make streamers. how many dekameters of crepe paper does Emma use