What is the auxiliary space complexity of bead sort?

What is the auxiliary space complexity of bead sort?
A. O(n)
B. O(1)
C. O(n$^{2}$)
D. O(n log n)
 
Answer: c
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.
 

Tìm kiếm

Back
Top