What is the space complexity of the HeapSort algorithm?
Show answer
Correct answer A
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).