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

What is the space complexity of selection sort?

0 Answers  


Define linked lists?

0 Answers  


Is boolean a data type?

0 Answers  


Explain the most efficient method to reverse a linked list?

0 Answers  


What is binary tree and its properties?

0 Answers  






How is the front of the queue calculated ?

0 Answers  


What data structure underlies a python list?

0 Answers  


how to find the number of possible tree in the given tree.

12 Answers   Persistent, TCS, Wipro,


What is an expression tree?

0 Answers  


What is an recursive algorithm?

0 Answers  


Write a data structure for a queue.

0 Answers   Tavant Technologies, Zensar,


What is a spanning tree?does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?

0 Answers  


Categories