OD
(Choose 1 answer)
Select the most correct statement about the complexity of heapsort
A. The best case is O(n), and the worst case is O(n^2)
B. The best case is O(n), and the worst case is O(nlogn)
C. Best case is O(nlogn), the worst case is O(n^2)
D. Both best and worst cases are O(nlogn)
(29