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 space complexity of selection sort?
Define linked lists?
Is boolean a data type?
Explain the most efficient method to reverse a linked list?
What is binary tree and its properties?
How is the front of the queue calculated ?
What data structure underlies a python list?
how to find the number of possible tree in the given tree.
12 Answers Persistent, TCS, Wipro,
What is an expression tree?
What is an recursive algorithm?
Write a data structure for a queue.
0 Answers Tavant Technologies, Zensar,
What is a spanning tree?does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?