1.

How many comparisons will be made to sort the array arr={1,5,3,8,2} using pigeonhole sort?(a) 5(b) 7(c) 9(d) 0The question was asked in final exam.This intriguing question originated from Sorting topic in division Sorting of Data Structures & Algorithms II

Answer»

Correct CHOICE is (d) 0

The best I can explain: As PIGEONHOLE sort is an example of a non-comparison sort so it is able to sort an ARRAY WITHOUT making any comparison. So 0 comparisons are required.



Discussion

No Comment Found

Related InterviewSolutions