rashed8228 rashed8228
  • 15-06-2021
  • Computers and Technology
contestada


Can you help me in this question

Can you help me in this question class=

Respuesta :

tonb
tonb tonb
  • 15-06-2021

Answer:

6 2 and 0

Explanation:

This algorithm doesn't work if the list is not ordered ascending.

In this example it is not, and indeed the item "1" is never found.

first cycle: first=0, last=12 so midpoint=6

second cycle: first=0, last=5 so midpoint=2

last cycle: first=0, last=1 so midpoint=0

then last is assigned -1 so the while statement is no longer true.

Answer Link

Otras preguntas

solve the equation 4+0.3x=19
In Western Europe, what city would you find at 53 degrees north and 0 degrees west
Solve 6[5x(41-36)-(8+14)] and show all work.
need help on any number cause it is due tomorrow
Fred bought 6 new baseball trading cards to add to his collection. The next day his dog ate half of his collection. There are now only 29 cards left. How many c
how to round 43 to the nearest ten
The cell membrane of a red blood cell will allow water, oxygen, carbon dioxide, and glucose to pass through. Since other substances are blocked from coming in,
Evaluate the expression, using the given value of the variable. 4 – 2x + 5x when x = 4 A. –24 B. –18 C. 16 D. 28
What prevents a plant cell from bursting when it's full of water?
According to Gibbon, in what ways has "primitive man progressed over time? what assures the author that this progress will continue?