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 |
Why linked lists are better than arrays?
Do you know how to find if linked list has loop?
What is peep stack?
What are the different types of sorting in data structure?
Define back edge?
What actions are performed when a function returns?
State the difference between arrays and linked lists?
Does treeset allow null?
Can hashmap be sorted?
Why do we use collections?
Can we store primitives in collections?
State the different types of linked lists?