Pregunta de entrevista de FastModel Sports

How would you use recursion in this solution?