Professional KnowledgeHardIBPS SO IT

Which sorting algorithm has O(n log n) worst case and is not stable?

  1. A. Merge sort
  2. B. Heap sort
  3. C. Insertion sort
  4. D. Bubble sort

Correct answer: B. Heap sort

Heap sort swaps distant elements and does not preserve equal-key order.

More IT Officer Professional Knowledge (IBPS SO) questions

Exams that ask this topic