Avature interview question

Write some recursive function.