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

Anyone plzz help me
I need help ASAP thanks
It is defined as the number of particles per mole of a substance. *a. Molar ratiob. Molec. Avogrado's number​
how to write a Alcaic Stanza
Gllberto invests $10,000 in a savings account that pays 4.75% simple interest. If Gilberto makes no withdrawals or deposits to the account, how much will be in
This is the last question I promise- if anyone could help with any of the questions I’d really appreciate it!!
Solve the equation for x. 2(5+3^x+2)=100
Identify how the Soviet Union carried out Communist policies
Please help me with this math problem! I'm really confused.
Which statement is true? A. All squares are similar to each other B. All rectangles are similar to each other C. All squares are similar to each other, and all