GATE CS 2019 · Question 47 · Algorithms · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer

There are n unsorted arrays: A₁, A₂, …, Aₙ. Assume that n is odd. Each of A₁, A₂, …, Aₙ contains n distinct elements. There are no common elements between any two arrays. The worst-case time complexity of computing the median of the medians of A₁, A₂, …, Aₙ is

  1. (A) O(n)
  2. (B) O(n log n)
  3. (C) O(n²)
  4. (D) Ω(n² log n)
Answer

Answer (C)

Answer from the official GATE CS 2019 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes