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 heap sort stable?
What is worst case complexity algorithm?
What is harvesting in agriculture?
Can hashtable have duplicate values?
Define primary clustering?
Are data structures important?
Can we put null key in hashmap?
Can treeset contain null?
What is a matrix? Explain its uses with an example
What does each entry in the link list called?
Why insertion is faster in linked list?
Mention for which header list, you will found the last node contains the null pointer?