Pergunta de entrevista da empresa Bloomberg

Leetcode style problem - data structures related