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

blank can be made in the field or in the laboratory
There are 8 crackers in 1 serving, 16 crackers in 2 servings, 24 crackers in 3 servings, and so on. How many crackers are in a box of 12 servings?
How does that emphasis on nature reflect the everyday life of the people
What are five types of chemical weathering
Evaluate the formula V=BH/3 for b= 9in and h = 32 in
Both DNA and RNA contain a five-carbon sugar. This sugar is
How many miles will paez family drive each day if they decide to take 5 days to drive 865 mi to Dallas
TRUE OR FALSE IF FALSE WHAT IS IT respiration provides energy for cells without using oxygen
what was Egypt's greatest asset in trading
What would have been the likely consequences for the united states if other western powers had divided china into colonies instead of accepting the open door po