1.

Which of the following is a non-comparison sort?(a) heap sort(b) quick sort(c) merge sort(d) pigeonhole sortThe question was posed to me in an interview for internship.Question is from Sorting topic in section Sorting of Data Structures & Algorithms II

Answer»

The correct option is (d) pigeonhole sort

To EXPLAIN: Heap sort, merge sort and quick sort are EXAMPLES of comparison sort as it NEEDS to compare ARRAY elements in order to sort an array. Whereas pigeonhole sort is a non-comparison based sort.



Discussion

No Comment Found

Related InterviewSolutions