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 |
If you do not initialize an array what will happen?
What is time complexity of bubble sort?
What is sorting rule in shapes?
Is array of data structure?
What is a priority queue?
Is null allowed in list?
What is the need for extendible hashing?
Define degree of the node?
Write a program to reverse a link list.
How will you sort the elements of array in descending order?
Does arraylist have index?
What is difference between hashmap and linkedhashmap?