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

)In the ADT graph, the method getNumberOfEdges has efficiency

A. O(1)

B.O(n)

C.O(logn)

D.O(n2)

Respuesta :

ExieFansler ExieFansler
  • 03-09-2019

Answer:

B.O(n)

Explanation:

In ADT graph the efficiency of the method getNumberOfEdges is O(n) because to get the number of edges we have to traverse the whole graph or every vertex if there are n vertices so the time complexity of traversing the graph comes out to be O(n).

Hence we conclude that the answer to this question is O(n).

Answer Link

Otras preguntas

what is the minimum value of "f(x)=7(x-8)^2+5" ?
What is the purpose of a cause-effect text structure?
Taking advantage of the critiquing process is something you should do with ___________ piece(s) of art you create. only some of the each and every none of the m
Who was the queen of England during the industrial revolution
Mr Jack thinks that ⅘ is equivalent to 9/10 because 4+5=9 and 5+5=10 Explain what was incorrect about this. Please use the terms numerator and denominator in yo
I need this done today whoever gets this correct gets brainliest!!! PLZZ HELPP MEE!!! hurryy
I NEED HELP PLEASE here is the problem
how do you do this because for the blank spot I got -8 but cannot solve the rest.​
What question would most help you evaluate “The Old Man at the Bridge”? Select one: a.Does it offer a window into important current issues? b.Does it give you a
Find the length of side x in simplest radical form with a rational denominator