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

you can click and drag an icon on a computer screen. Is this an example of a translation?
An envelope is 3 inches wide with a total area of 30 square inches. What is height?
It costs the factory $4 to make each part A. About how much does it cost to make part A each month? ( part A is 234 )
Which form does a verb take to express a hypothetical situation? imperative indicative subjunctive active
what is 5 1/2 of 60%
what is an antonym for stern lecture
A bag of halloween candy weighs 4.7 pounds how much would a 3.4 bag weigh?
Rose can run 4 miles in 56 minutes how many miles does Rosa run if she runs for 42 minutes
One of the factors in a multiplication is less than 1. How does the product compare to the other factor?
value of 9 x 10 to the fourth power