TikTok interview question

It was a question about recursion.