channyfilthy9896 channyfilthy9896
  • 21-08-2019
  • Computers and Technology
contestada

In the ADT graph the methid addVertex has efficiency

A. O(1)

B.O(n)

C.O(logn)

D.O(n2)

Respuesta :

ExieFansler ExieFansler
  • 03-09-2019

Answer:

In ADT graph the efficiency of addVertex has efficiency O(logn).

Explanation:

The time complexity of the method addvertex in ADT graph is O(logn). addVertex method has time complexity of O(logn) because it has to divide the list in half and add the vertex according to the place where the needs to be added.

hence we conclude that the answer is O(logn).

Answer Link

Otras preguntas

Please help!!! a ramp is 3 feet high. the angle of elevation is 5 degrees. how long is the ramp to the nearest foot?
What general effects on the earth’s ocean tides would result if (a) the Moon’s mass were doubled, (b) the distance between the earth and the Moon were ½ (c) the
Write 42,300 as a multiple of a power of ten
How does Spencer's use of chronological order affect the plot of his narrative?
Is x + 2 a factor of p(x) = x°- 3x² – 7x + 6 ? Explain your answer.
What comparison is the metaphor making?
These are composed of intersecting horizontal and vertical lines that form a cartesian plane.
You are designing a pendulum clock to have a period of 1.0 s. How long should the pendulum be?
Problem ID: PRABEPM6 Find the area of a square if its side length is: 11/8
which structure inside the cell holds the digestive enzymes that break down the carbohydrates