1.

What is the worst space complexity of bucket sort (k = number of buckets)?(a) O(n + k)(b) O(n.k)(c) O(n^2)(d) O(n log n)This question was addressed to me in an interview for internship.Query is from Sorting in section Sorting of Data Structures & Algorithms II

Answer»

The correct answer is (b) O(n.k)

The best I can EXPLAIN: Worst case space COMPLEXITY of bucket sort is O(n.k). So it is not an in place SORTING algorithm.



Discussion

No Comment Found

Related InterviewSolutions