Pregunta de entrevista de Refyne

Coding question based on recursion.