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
Otrada [13]
3 years ago
14

Whats an effective way to sort linked lists in cpp.

Computers and Technology
1 answer:
irina [24]3 years ago
6 0

Answer:

Using Merge Sort.

Explanation:

Merge Sort is preferred for sorting the linked list because the the data stored in linked list is not in serial memory address which makes the quick sort algorithm very slow and other sorting algorithms impossible.

Merge Sort is a divide and conquer algorithm.

In this algorithms we divide the linked list into sub parts and sort the sub parts of the linked list and then we merge them in sorted order. It is a very effective approach for linked list sorting.

The time complexity of merge sort is O(NLogN).

You might be interested in
PLZZZZ HELPPP and please don’t send a link , Explain how the processing stage contributes to a computer creating an output.
-Dominant- [34]
The output/interpretation stage is the stage at which data is finally usable to non-data scientists. It is translated, readable, and often in the form of graphs, videos, images, plain text, etc.).
3 0
3 years ago
Assign total_owls with the sum of num_owls_A and num_owls_B.
zavuch27 [327]

To debug a code, means that we locate and fix the errors in a code.

The issue with your code is that:

<em>You did not convert num_owls_A and num_owls_B to integers, when adding them together.</em>

The fix to this is that:

<em>You need to convert num_owls_A and num_owls_B to integers, when adding them together.</em>

The fix is as follows:

<em>total_owls = int(num_owls_A) + int(num_owls_B)</em>

The updated code is as follows:

<em>total_owls = 0 </em>

<em>num_owls_A = input() </em>

<em>num_owls_B = input() </em>

<em>total_owls = int(num_owls_A) + int(num_owls_B) </em>

<em>print('Number of owls:', total_owls)</em>

<em />

<em>The above code will perform addition operations for all inputs</em>

Read more about Python programs at:

brainly.com/question/13246781

8 0
3 years ago
How is a source file different from a "listing file"?
S_A_V [24]
E-filing<span> technical information - acceptable native (or </span>source<span>) electronic </span>file<span> format types. ... Whenever possible, the electronic </span>source<span> files used to create the PDF should be uploaded after the PDF in the same </span>filing<span>. Multiple </span>source<span> files can be uploaded in the same </span>filing<span>.</span>
8 0
3 years ago
Based on the module,
svp [43]

Answer:

Explanation:

One group of students did an experiment to study the movement of ocean water. The steps of the experiment are listed below.

Fill a rectangular baking glass dish with water.

Place a plastic bag with ice in the water near the left edge of the dish.

Place a lighted lamp near the left edge of the dish so that its light falls directly on the plastic bag.

Put a few drops of ink in the water.

The student did not observe any circulation of ink in the water as expected because the experiment had a flaw. Which of these statements best describes the flaw in the experiment? (2 points)

Not enough ink was added.

Not enough water was taken.

The dish was too small for the experiment.

The lamp and the ice bag were at the same place.

8 0
3 years ago
If i'm wanting to use hydra on linux to crack a password and the issue regarding hashes occurs, what shall i do?
Inessa05 [86]
Give up do research and then try again
7 0
4 years ago
Other questions:
  • Fibre channel switched networks rely on the concept of a ___________________which is a fundamental concept in how the network wo
    10·1 answer
  • A data structure used to bind an authenticated individual to a public key is the definition of ________.
    14·1 answer
  • A device that produces a permanent human-readable text of graphic document.
    15·1 answer
  • Which of the following can indicate what careers will be enjoyable ?
    5·1 answer
  • Think back over the information presented in the lesson about how you can skillfully use the Internet when doing research. Selec
    14·1 answer
  • Write a function named word_count that accepts a string as its parameter and returns the number of words in the string. A word i
    10·1 answer
  • What type of chart is good for single series of data​
    15·2 answers
  • In the mouse properties window you can
    6·1 answer
  • Define data, information and the relation between the two?
    8·1 answer
  • How do we benefit from this increased interconnectivity?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!