Pregunta de entrevista de Apple

Many that needs to be coded in python.