Let a and b be two sorted arrays containing n integers each, in non-decreasing…

PYQ GATE 2005

Let a and b be two sorted arrays containing n integers each, in non-decreasing order. Let c be a sorted array containing 2n integers obtained by merging the two arrays a and b. Assuming the arrays are indexed starting from 0, consider the following four statements

  1. a[i] ≥ b [i] => c[2i] ≥ a [i]

  2. a[i] ≥ b [i] => c[2i] ≥ b [i]

  3. a[i] ≥ b [i] => c[2i] ≤ a [i]

  4. a[i] ≥ b [i] => c[2i] ≤ b [i]

Which of the following is TRUE?

  1. A.

    only I and II

  2. B.

    only I and IV

  3. C.

    only II and III

  4. D.

    only III and IV

Attempted by 195 students.

Sign up free to check your answer

Sign up free

Explore the full course: Algorithms

Loading lesson…