Skip to content
Related Articles

Related Articles

Improve Article
GATE | GATE-CS-2003 | Question 4
  • Difficulty Level : Easy
  • Last Updated : 03 Oct, 2014

Let A be a sequence of 8 distinct integers sorted in ascending order. How many distinct pairs of sequences, B and C are there such that (i) each is sorted in ascending order, (ii) B has 5 and C has 3 elements, and (iii) the result of merging B and C gives A?
(A) 2
(B) 30
(C) 56
(D) 256

Answer: (C)


Suppose you have selected 3 elements from 8 in 8C3 ways, the remaining elements are treated as another array and merging both the arrays gives the sorted array. Here, you can select either 3 or 5.

=> 8C3 = 8C5 = 8!/(3!5!) = 7*8 = 56 Ways.

This solution is contributed by Anil Saikrishna Devarasetty

Quiz of this Question

Attention reader! Don’t stop learning now. Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :