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

15 point and brainlyest if possible. Thanks :)
Find two positive numbers such that the sum of the first and twice the second is 100
Which of these best explains why a paper clip can float on water?
who is considered the primary author of the Declaration of Independence.
Can you revise this please asap !!!!!We have to think about the things the deceased wanted private on social media, yet, now they have no control. And reall
How did American Indians respond to the flood of westward migration after the Civil War
What is a number that when you multiply it by 7 and add 25 to the product, you get 46?answer?
What is the greatest exercise risk for college students g?
Two cell phone companies advertise their cell plans: company 1 charges $35 activation plus $45 a month. Company 2 charges no activation fee but they charge $50
Name one factor that enabled the Continental Army to defeat the British army in the revolution