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 push and pop in stack?
Is boolean a data type?
What is a pseudocode example?
Convert following infix expression to the prefix expression. a - b + c * (d / e - (f + g))
33 Answers Amazon, Microsoft, Star Technologies, Sun Microsystems, Wipro,
What is treemap chart?
Does map extend iterable?
What do you mean by 2-3-4 tree?
What is the use of hashtable?
Can a stack be described as a pointer? Explain.
Differentiate linear from non linear data structure?
What is the time complexity of hashmap get () and put () method?
What is red black tree in data structure?