Pregunta de entrevista de Block

Very simple algorithm and data structure