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 do you mean by balance factor of a node in avl tree?
What is difference between list and linked list?
which is the simplest file structure? (Sequential, indexed, random)
Does arraylist extend list?
Does array sort mutate?
What does a treemap do?
What things you would care about to improve the performance of application if its identified that its db communication that needs to be improved?
What actions are performed when a function is called?
What do you mean by quadratic probing?
Should I use hashmap or hashtable?
How does a selection sort work for an array?
Does stringutils isempty check for null?