1.

Which of the following uses the largest amount of auxiliary space for sorting?(a) Bubble sort(b) Counting sort(c) Quick sort(d) Heap sortThe question was asked in a national level competition.My question is based upon Sorting in division Sorting of Data Structures & Algorithms II

Answer»

Right choice is (B) Counting sort

Best explanation: Counting sort REQUIRES auxiliary SPACE of O(n+k) whereas quick sort, bubble sort and heap sort are in PLACE sorting techniques. Thus counting sort requires most auxiliary space.



Discussion

No Comment Found

Related InterviewSolutions