1.

What is the auxiliary space complexity of bead sort?(a) O(n)(b) O(1)(c) O(n^2)(d) O(n log n)I got this question in semester exam.My question is based upon Sorting topic in section Sorting of Data Structures & Algorithms II

Answer»

The correct CHOICE is (C) O(n^2)

Best EXPLANATION: The auxiliary SPACE complexity of bead sort is O(n^2). It is because an array of size maximum_element*n (maximum_element is the maximum element that is present in the array and n is the size of the array) has to be maintained.



Discussion

No Comment Found

Related InterviewSolutions