emilyb7191 emilyb7191
  • 22-08-2019
  • Computers and Technology
contestada

In the ADT graph, the method addEdge has efficiency

A. O(1)

B.O(n)

C.O(logn)

D.O(n2)

Respuesta :

ExieFansler ExieFansler
  • 28-08-2019

Answer:

B.O(n).

Explanation:

In an ADT graph the method addEdge uses an Array of list.So in the worst case and the worst will be when the list already has n elements in it.

So to add an edge we have to iterate over the list upto nth element and then add the edge after that.So it has to travel over n elements.

So we can say that the answer is O(n).

Answer Link
Shirleythurmond57
Shirleythurmond57 Shirleythurmond57
  • 12-03-2021

Answer:

Thx 4 the points bro

Explanation:

its B

Answer Link

Otras preguntas

Jack had 50 sweets he dropped 6 and gave away 4 and cut 7 in half how many did he have?
On Monday, it took Helen 3 hours to do a page of science homework exercises. The next day she did the same number of exercises in 2 hours. If her average rate o
X+2y+6=0Solve for the value of "y"And explain how to graph the result.
Should spanish colonial settlers accept the new laws of 1542?
2.434 to 3 significant figures
Is there a diet that can cure cancer
The width of a rectangle is 5 feet, and the diagonal is 8 feet. Which is the area of the rectangle? (Round to nearest hundredth.)
How to solve 5(x-3)+2=7?step by step please help me math tutor. Right answer only.
Suppose you have d dollars in your bank account. You spent 22 but have at least 28 left. How much money did you have initially. Write and solve an inequality th
Who Owns Antarctica? thanks:)