1.

Bucket sort is most efficient in the case when __________(a) the input is non uniformly distributed(b) the input is uniformly distributed(c) the input is randomly distributed(d) the input range is largeThis question was addressed to me in a national level competition.The question is from Sorting in chapter Sorting of Data Structures & Algorithms II

Answer»

Correct choice is (b) the INPUT is UNIFORMLY distributed

Easiest explanation - Bucket SORT works by distributing the array elements into a number of BUCKETS. So bucket sort is most EFFICIENT in the case when the input is uniformly distributed.



Discussion

No Comment Found

Related InterviewSolutions