199 views
0 votes
0 votes
Which of the following algorithm is best suitable for sorting of linked list?

A) Quick

B) Merge

C) Heap

D) None

1 Answer

1 votes
1 votes
Merge Sort is often the Best choice for sorting a linked list. Merge sort is a stable sort and it is nore efficient at handling slow-to-access sequential memory. It has the best worst case time complexity among the given i.e O(nlogn).

Random Access Performance makes quick sort perform poorly(selection of pivot and then the movement)and Heap sort is not possible to be implemented in O(nlogn) on a linked list.

No related questions found