Merck interview question

To implement a recursive function,