How would you sort a linked list?

Answers were Sorted based on User's Feedback



How would you sort a linked list?..

Answer / touchriverian

using merge sort.

http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html

Is This Answer Correct ?    9 Yes 3 No

How would you sort a linked list?..

Answer / ashok

there is no answer

Is This Answer Correct ?    2 Yes 1 No

How would you sort a linked list?..

Answer / ramesh

I think insertion sort will perform better

Is This Answer Correct ?    3 Yes 3 No

How would you sort a linked list?..

Answer / sdfg

write an insert in order function where it traverse the list until it finds a greater element and put it before it.
create a new list and insert all items in the old list to the new list using the InsertInOrder function

Is This Answer Correct ?    0 Yes 0 No

How would you sort a linked list?..

Answer / deepak pareek

I THINK....selection sort is the better way to sort the
link list.

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More Data Structures Interview Questions

Is list a data structure?

0 Answers  


Write the stack overflow condition.

0 Answers  


Give us a program to reverse a linked list.

0 Answers   DELL, Genpact,


Is bucket sort a comparison sort?

0 Answers  


How does dynamic memory allocation help in managing data?

0 Answers  






Which is the parent class of linkedhashset class?

0 Answers  


Define in brief an array. What are the types of array operations?

0 Answers  


What are the advantages of modularity?

0 Answers  


What is data structure definition?

0 Answers  


Define depth and height of a tree?

0 Answers  


What is data in computer science?

0 Answers  


Differentiate between failfast and failsafe.

0 Answers  


Categories