+1 vote
in Data Structures & Algorithms II by (110k points)
Which one of the following sorting algorithm is best suited to sort an array of 1 million elements?

(a) Bubble sort

(b) Insertion sort

(c) Merge sort

(d) Quick sort

The question was asked in quiz.

This intriguing question comes from Quicksort topic in section Sorting of Data Structures & Algorithms II

1 Answer

+1 vote
by (614k points)
selected by
 
Best answer
Right choice is (d) Quick sort

For explanation: The Quick sort is best suited to sort the array of 1 million elements. The practical implementations of Quick sort use randomised version. In practice randomised Quick sort algorithms rarely shows worst case behaviour and is almost always O(nlogn). And Quick sort requires little additional space and exhibits good cache locality.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...