Pregunta de entrevista de Google

data structure and algorithm, an onsite interview