Pergunta de entrevista da empresa Canonical

Solve a Python algorithm problem involving arrays and recursion.