Pregunta de entrevista de Continental

Advanced Python, advanced data structure question