← Quiz: Heaps and Heap Sort Internals: all 15 questions
Quiz: Heaps and Heap Sort Internals · Question 8 of 15
Which statement about heap sort is true?
Which statement about heap sort is true?
- A.It is stable
- B.It needs O(n) extra memory
- C.Its worst case is O(n log n) and it sorts in place with O(1) extra space
- D.Its worst case is O(n²)
Answer & explanation
Correct answer: Its worst case is O(n log n) and it sorts in place with O(1) extra space
It is not stable, but it guarantees O(n log n) with constant extra space.
Can you get the rest right without peeking?
Take the timed Quiz: Heaps and Heap Sort Internals quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →