981. What is the space complexity of the HeapSort algorithm?
- A. None of these
- B. O(2)
- C. O(3)
- D. O(1)
Check answer and explanation
Answer: O(1)
Explanation Heap Sort is an in-place sorting algorithm, meaning it does not require extra arrays. All operations are performed within the original array. Therefore, its space complexity is constant, O(1) . Last verified on 24-03-2026