There are \(n\) unsorted arrays: \(A_1, A_2, …, A_n\). Assume that \(n\) is…

PYQ GATE 2019

There are nn unsorted arrays: A1,A2,…,AnA_1, A_2, …, A_n. Assume that nn  is odd. Each of A1,A2,…,AnA_1, A_2, …, A_n contains nn distinct elements. There are no common elements between any two arrays. The worst-case time complexity of computing the median of the medians of A1,A2,…,AnA_1, A_2, …, A_n is

  1. A.

    O(n)O(n)

  2. B.

    O(nlog⁡n)O(n \log n)

  3. C.

    O(n2)O(n^2)

  4. D.

    Ω(n2log⁡n)\Omega(n^2 \log n)

Attempted by 386 students.

Sign up free to check your answer

Sign up free

Explore the full course: Algorithms

Loading lesson…