Amazon Interview Question

combinatorics programming question using recursion