robinjaiemccray13 robinjaiemccray13
  • 22-08-2019
  • Computers and Technology
contestada

Assuming we do not use recursion, why is a loop necessary to find an arbitrary node in a linked list

Respuesta :

ExieFansler ExieFansler
  • 26-08-2019

Answer:

We cannot access nodes in the linked list directly.

Explanation:

In linked list we cannot access nodes directly like arrays.In arrays we have index for the direct access to the element.So we have to iterate over the linked list and search for the node one by one.Since we are not using any recursion so we have to use loop to iterate over the linked list.

Answer Link

Otras preguntas

draw, label and box in 7. draw picures (quick tens) to count on to 150
Selena needs to rent a car. The car rental company gives him two options. Option A is to pay $28 a day plus $0.15 a mile and option B is to pay $12 a day and $0
Find the area of the figure. *50 ft2 *41 ft2 *42 ft2 *38 ft2
Will the opposite of a opposite always be positive?
Of all numbers x and y whose sum is​ 50, the two that have the maximum product are xequals=25 and yequals=25. that​ is, if xplus+yequals=​50, then xequals=25 an
A ball is launched into the sky at 19.6 feet per second from a 58.8 meter tall building. The equation for the ball’s height, h, at time t seconds is h = -4.9t2
using long division to divide 3x^4-2x^3+x-1 by x^2-x-2
When cells need energy, reactions break down _____ in the cell and capture the released energy by synthesizing _____?
if a=b then ac=bc. this called the of quality.(2words)
what is the main role of the carbohydrate glucose in a living cell