Microsoft interview question

a coding questions involving recursion