1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kicyunya [14]
3 years ago
12

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

Computers and Technology
1 answer:
anastassius [24]3 years ago
4 0

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.

You might be interested in
Write a class named Taxicab that has three **private** data members: one that holds the current x-coordinate, one that holds the
Licemer1 [7]

Answer:

See explaination

Explanation:

class Taxicab():

def __init__(self, x, y):

self.x_coordinate = x

self.y_coordinate = y

self.odometer = 0

def get_x_coord(self):

return self.x_coordinate

def get_y_coord(self):

return self.y_coordinate

def get_odometer(self):

return self.odometer

def move_x(self, distance):

self.x_coordinate += distance

# add the absolute distance to odometer

self.odometer += abs(distance)

def move_y(self, distance):

self.y_coordinate += distance

# add the absolute distance to odometer

self.odometer += abs(distance)

cab = Taxicab(5,-8)

cab.move_x(3)

cab.move_y(-4)

cab.move_x(-1)

print(cab.odometer) # will print 8 3+4+1 = 8

7 0
2 years ago
Renee just got on the freeway to go to her cousin's house in Denver. She is driving 50 miles per hour. Her sister Kim left one h
defon

let's say they catch-up to each other after t hour.

so

in t hour distance travelled by Renee

d = speed × time = 50t

in t hour distance travelled by Kim

d = speed × time = 60(t-1) + 0×1 = 60(t-1)

Note: here kim didn't covered any distance in first hour and in rest t-1 hour it travelled all distance

now.as distance travelled by both is same so

60(t-1) = 50t

60t -60 = 50t

adding 60 both sides

60t = 50t+60

subtracting 50t both sides

60t -50t = 50t+60 - 50t

10t = 60

dividing by 10 both sides

t = 60/10 = 6

so in 6 hour both will catch-up to each other

3 0
3 years ago
Lin is creating a template for the configuration of Windows servers in her organization. The configuration includes the basic se
larisa86 [58]

The type of document should she create is  baseline document. Check more about the term Baseline below.

<h3>What is a Baseline document?</h3>

A Baseline document is known to be a kind official or legalized document that has passed through some measures of start approval and was used for its purpose.

Note that for Lin to be able to make the template for the configuration of Windows servers, the type of document that she can create is  baseline document.

Learn more about Windows servers  from

brainly.com/question/14526761

#SJ1

3 0
1 year ago
A key or combination of keys that complete an action more efficiently than using the mouse is called a(n) keyboard shortcut.
andreev551 [17]
The answer to your question is true
6 0
3 years ago
Leah is now in the Backstage view. Which option should she use to access a blank presentation? Info New Open Options
nekit [7.7K]

Answer:

She Should use New

7 0
3 years ago
Other questions:
  • Why might you use the "search network campaigns with display opt-in" campaign type?
    11·2 answers
  • An item such as a smart card is an example of the _______ form of authentication.
    10·1 answer
  • The most widely used presentation software program is Microsoft PowerPoint. You can produce a professional and memorable present
    14·1 answer
  • Illusions in physcology​
    14·1 answer
  • Histogram 9AMAA 12/01/2021.
    9·1 answer
  • Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to the power of z), the absolut
    12·1 answer
  • What usually happens during the investigation &amp; analysis stage of the Systems Life Cycle
    15·1 answer
  • What is the most vulnerable information that should be protected to prevent unauthorized access to your online files and records
    8·1 answer
  • Spreadsheets are sometimes credited with legitimizing the personal computer as a business tool. Why do you think they had such a
    13·1 answer
  • Distributed databases and data warehouses would be considered which data model type?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!