Domanda di colloquio di Secondmind

How would you solve (x) technical problem (involving recursion, not too complex)