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 |
What is difference between concurrenthashmap and hashtable?
What is top in stack?
Why linked lists are better than arrays?
Is Arraylist faster than Array? Why?
Treemap orders the elements on which field?
What is the minimum number of queues that can be used to implement a priority queue?
Can we create a null as a key for a map collection?
How arraylist increase its size?
Tell me why might quick sort might be better than merge sort?
What is data structures in computer science?
How is hashmap o 1?
How do you empty an arraylist?