Domanda di colloquio di Canonical

Solve a Python algorithm problem involving arrays and recursion.