Microsoft Interview Question

a coding questions involving recursion