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

The value of each expression if x=12 3x
Need help with both shown questions! Tysm!!
If the words in an analogy problem are all concrete, then that means that the answer to the problem will be _____ ? A. Abstract B. Concrete
How do you graph the function y=1/5x+4
How often should businesses perform cash drops? A. Only once, at the end of the business day B. Only once a month, once all the receipts are totaled C. Whenever
Which expression is equivalent to 200?
After 16.5s, a joggers displacement is .200 km. what is the velocity in m/s? what is the velocity in km/hr?
SOMEONE PLEASE HELP ME I NEED THE ANSWER AS SOON AS POSSIBLE PLEASE I WILL GIVE YOU BRAINIEST IF THE ANSWER IS CORRECT
7. Sam spends $1200 on his education, which is of his salary. Hiis salary is $4500. a TRUE b. FALSE. Help please and thank you
Let f(x) = 6x^2 +5 and g(x) = 3x - 5. Find g(f(0)).