Qualtrics interview question

They asked me to solve a problem using recursion