Question

What is the time complexity of Heap Sort in the worst case and what type of heap is used to sort an array in ascending order?

A O(n²) worst case; Min-Heap for ascending order
B O(n log n) worst case; Min-Heap for ascending order
C O(n log n) worst case; Max-Heap for ascending order
D O(n log n) average; O(n²) worst; Max-Heap
E O(log n) worst case; Max-Heap for ascending order
Practice Next

Hey! Ask a query