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 the difference between Array and LinkedList?
Explain the common uses of tree database.
What is queue in data structure?
How do you find the index of an element in an arraylist?
What is array and its types in data structure?
Which sorting is stable?
What are the goals of data structure?
What is the use of sorting the data?
Is array a linked list?
Can we sort hashmap?
what is a balanced tree.
What is the average number of comparisons needed in a sequential search to determine the position of an element in an array of 100 elements, if the elements are ordered from largest to smallest?
19 Answers ABB, SDE,