Qualtrics Interview Question

Something that uses recursion to solve.