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

What property is 12+0=12?
the 2006 genius Book of World Records for the heaviest man weighed 1230 pounds how many ounces did he weigh
How does Macbeth react when Duncan declares his son Malcolm heir to the Scottish throne?
Which of the following actions were illegal for women until the mid-1800s?
how many groups of 8 are in 70
what are two reasons cassie tells big ma to move the wagon forward in chapter 5 of roll of thunder hear my cry
Please help find the value of X
How does the national government help improve public health? It educates the public about healthy lifestyles and asks people to pursue them. It takes national-
1My name is Maddox Smith. 2I am the Treasurer of the San Marcos High School Charity Club. 3We're having a canned food drive. 4This event is going to be off the
What does it mean to practice subsistence farming?