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

what number has the same value as 50 tens??
A helicopter rose vertically 300m and then flew west 400m. How far was the helicopter from it's starting point?
Okay so what is a-9.45=-10.6?
for each pair, determine quotient is the same or different explain. A. 72,000 divide 9 and 40,000 divide 5 B. 3,600 divide 12 and 1,800 divide 6 EXPLAIN PLEASE
Write the expression in factored form. 3m-6n 12x-18y 6x-18
What is a fixed percent of the principal?
During what period did Egypt reach the height of its power
a wide screen television measures 36 inches by 54 inches.A movie theater screen measures 42 feet by 63 feet. Are the screens similar? explain.
13 apples for 2 pies
Jerome is keeping track of how many books he and his friends have read during the first 100 days of school. To help Jerome present the data to his teacher, mak