🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.It is stable
  2. B.It needs O(n) extra memory
  3. C.Its worst case is O(n log n) and it sorts in place with O(1) extra space
  4. 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 →