1.

How many comparisons will be made to sort the array arr={1,5,3,8,2} using counting sort?(a) 5(b) 7(c) 9(d) 0This question was posed to me in an interview for internship.This question is from Sorting in chapter Sorting of Data Structures & Algorithms II

Answer»

Right answer is (d) 0

The BEST I can EXPLAIN: As counting sort is an example of non comparison sort so it is ABLE to sort an array WITHOUT making any comparison.



Discussion

No Comment Found

Related InterviewSolutions