Angel8960 Angel8960
  • 23-08-2019
  • Computers and Technology
contestada

The efficiency for recursively traversing a chain of linked nodes is

A.O(n2)

B. O(1)

C.it cannot be proven

D.O(n)

Respuesta :

ExieFansler ExieFansler
  • 26-08-2019

Answer:

D. O(n).

Explanation:

A chain of linked nodes also known as linked list.So the efficiency of recursively traversing the linked list is O(n) because in recursion it has to traverse over the full linked list.Go to every node and then to it's next there are no other paths to reach to the last there is only one path that goes through every node so the time complexity will be O(n).

Answer Link

Otras preguntas

Meg skateboards 1/4 of a mile in 1/2 of an hour. At this rate,how far will she skateboard in a hour
1) Muscles are organs composed mainly of muscle fibers. True False 2) Muscles appear striated, or striped, because their cells are arranged in sheets. True False
3 factors that influence what and individuals appropriate weight should be
Compare and contrast granite and rhyolite
In what way is reforestation a positive initiative? A. It saves a portion of land from urban sprawl. B. It replants trees on lands destroyed by farming, manufac
How do you use commas
Metacognition refers to A. the origin of English words from Greek or Latin roots. B. attaching new material to what you already know. C. the ability t
Who was the first ruler of the Tang Dynasty?
What is used to classify galaxies?star typesestimated agecolorshape
What is the distance between points (5, 5) and (1, 5) on a coordinate plane? units