Qualtrics interview question

Something that uses recursion to solve.