Pregunta de entrevista de Google

Nothing unexpected, all about algorithms and data structure.