Pergunta de entrevista da empresa Cadence Design Systems

Dising another game - also recursive solution.