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

In the following statement, an introductory element is provided that may need to be followed by a comma. Select the answer option that uses commas correctly. If
Match the terms to their correct definitions. 1. generation 2. rivalry 3. continuity 4. confidant I competition with another person consistency, when a change o
Graph the solution set to this inequality
Which of the following stores only one type of data in a specific location and must contain some value, meaning it cannot be null? (1 point) -primitive data str
help meeeeeee pleaseee !!!!
Which of the following software is unique to a Mac? A. OpenOffice Writer B. Pages C. Word Online D. Word Perfect
Plot −8/5 and 1.8 on the number line. Select the locations on the number line to plot the points.
I need help with number 2
Givin f(x) =x^2- 3 and g(x)=x+1. The composite function g•f is The answer is : X^2- 2
find the coordinates of the other endpoint of the segment, given its midpoint and one endpoint. (hint: let (x,y) be the unknown endpoint. apply the midpoint for