Refyne Interview Question

Coding question based on recursion.