Skip to content
Related Articles

Related Articles

GATE | GATE-CS-2003 | Question 4

View Discussion
Improve Article
Save Article
  • Difficulty Level : Easy
  • Last Updated : 28 Jun, 2021
View Discussion
Improve Article
Save Article

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

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!