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
- (A) O(n)
- (B) O(n log n)
- (C) O(n²)
- (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