Professional KnowledgeHardIBPS SO IT

Time complexity of finding the k-th smallest element in an unsorted array in the worst case using median-of-medians is:

  1. A. O(n log n)
  2. B. O(k log n)
  3. C. O(n^2)
  4. D. O(n)

Correct answer: D. O(n)

Median of medians guarantees linear-time worst-case selection.

More IT Officer Professional Knowledge (IBPS SO) questions

Exams that ask this topic