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

Rachel owns 2 parakeets. one fourth of all her bird are parakeets. how man birds does Rachel own?
How many angles does a cube have?
what is crossing a hybrid with a homozygous dominant or a homozygous recessive organism resulting in a 1:1 ratio called?
How many times can 3 go into 8
How to draw a model to prove that 3/10 is equal to 9/30
Rachel owns 2 parakeets. one fourth of all her bird are parakeets. how man birds does Rachel own?
why did Hitler feel justified in taking over Austria and the Sudetenland?
If water and ethanol both have all 3 intermolecular bonds, why does ethanol evaporate so much quicker?
why is 1/6 greater than 1/8 but less than 1/3
What is multiplication properties. Example a number line that goes from 0-27. Using numbers 6,7,8 and 9.