Pergunta de entrevista da empresa Robinhood

Some algorithm problems regarding dictionary and heap