TikTok Interview Question

It was a question about recursion.