Meta interview question

Solve a Recursive function