Pergunta de entrevista da empresa Secondmind

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