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

What was the farthest Nicole rode in a day?
President Kennedy authorized a failed invasion of: A. Vietnam B. Hungary C. Egypt D. Cuba
Matt has a box that measures 23 feet long and 16 feet wide. The volume of the box is 4,416 cubic feet. What is the height of the box in yards?
Write a descriptive essay about your locality​
519.6 x 10.86 by process.​
How much w work is done by a babysitter who uses 4500 w of power to lift a baby in 4s Serious answers please
Which distribution is skewed right?
2. Why might people in India perceive rain and clouds differently from people in the West?
Please help me tyy!!
Complete the probability model. Don’t forget to write each answer as a percentage.