Pregunta de entrevista de Robinhood

Some algorithm problems regarding dictionary and heap