1.

Which of the following don’t affect the time complexity of bucket sort?(a) algorithm implemented for sorting individual buckets(b) number of buckets used(c) distribution of input(d) input valuesI had been asked this question during an online exam.This question is from Sorting topic in division Sorting of Data Structures & Algorithms II

Answer»

Right choice is (d) input values

For explanation: Time complexity of bucket sort is affected by various FACTORS. These INCLUDE algorithm IMPLEMENTED for sorting individual buckets, number of buckets USED and distribution of input. It doesnot depend on the input VALUE. It can be either positive or negative or zero.



Discussion

No Comment Found

Related InterviewSolutions