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

6•72,749,973,947,937=?
If the original price is $55 and the sale price is $46.75 what is the discount?
Principle types of crime in the United States include a. violent crimes. c. white collar crime. b. crimes against property. d. all of the above Please selec
I need this expression simplified, please: -(6)^-1 Thanks -JP
is 5/5 greater than 99/100
Maria are flat areas on the moon’s surface. Please select the best answer from the choices provided T F
calculate the area of a square with sides of 5 inches
A boat can hold 45 people. 27 more people can fit on the boat. How many people are one the boat now?
How do you identify the center and radius of each . Then sketch the graph.
What is the location of the sum 11+(-5) with respect to 11 on a number line? A:five units to the left of 11 B:five units to the right of 11 C:11 units to the l