Amazon interview question

Recursion