Intermediate Data Structures & Algorithms
Q65 / 100

What is the time complexity of Heap Sort?

Correct! Well done.

Incorrect.

The correct answer is C) O(n log n)

C

Correct Answer

O(n log n)

Explanation

Heap sort builds a max-heap in O(n), then extracts the maximum n times (each extraction is O(log n)), giving O(n log n) overall. It sorts in-place.

Progress
65/100