Pregunta de entrevista de Amazon

combinatorics programming question using recursion