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

If4 times the reciprocal of a number is 3 more than 5/2 times the reciprocal of that number find the number Show your work
If4 times the reciprocal of a number is 3 more than 5/2 times the reciprocal of that number find the number Show your work
what is the difference between dividing 16 by 2 and finding the square root of 16
what events happened beforeloyalists left boston and philadelphia?
what is 4 over 9 minus 1 over 12 equal simplified?
If4 times the reciprocal of a number is 3 more than 5/2 times the reciprocal of that number find the number Show your work
The equation s x  2 5 can be used to estimate the speed, s, of a car in miles per hour, given the length in feet, x, of the tire marks it leaves on the ground.
What is the simplest form for the product 3/5 •25/36 is?
what is 4 over 9 minus 1 over 12 equal simplified?
what is the difference between dividing 16 by 2 and finding the square root of 16