Pergunta de entrevista da empresa Indian Statistical Institute

Question on combinatorics.