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

Mercantilists stated that a country's wealth and strength came from the ability to
Which of the following countries can be found in South America? Jamaica New Guinea Estonia Bolivia
On many advanced routers and switches, you can implement qos through bandwidth management, such as __________, where you control the flow of packets into or out
Please need some help on this
In which type of attribution error do people tend to attribute their successes to internal characteristics?
The economist paul samuelson analyzed a scenario in which r&d production suffers from foreign competition, thus lowering its price. samuelson notes that for
Trueview video ads can be especially effective for driving what goals?
Which of the following is the form of Tennyson's "The Lady of Shalott?" sonnet mock epic ballad ode
12+5v=2v-9 please show step by step!
This is a military strategy of deterrence in which the usage of nuclear weapons would result in the complete annihilation of both countries.