How would you sort a linked list?
Answers were Sorted based on User's Feedback
Answer / touchriverian
using merge sort.
http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html
Is This Answer Correct ? | 9 Yes | 3 No |
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 |
Answer / deepak pareek
I THINK....selection sort is the better way to sort the
link list.
Is This Answer Correct ? | 1 Yes | 2 No |
Is list a data structure?
Write the stack overflow condition.
Give us a program to reverse a linked list.
Is bucket sort a comparison sort?
How does dynamic memory allocation help in managing data?
Which is the parent class of linkedhashset class?
Define in brief an array. What are the types of array operations?
What are the advantages of modularity?
What is data structure definition?
Define depth and height of a tree?
What is data in computer science?
Differentiate between failfast and failsafe.