Pregunta de entrevista de Canonical

Solve a Python algorithm problem involving arrays and recursion.