Pregunta de entrevista de Bloomberg

basic brain teasers, and fairly easy data structures