Pergunta de entrevista da empresa Bloomberg

Data Structure problem, and 1 leetcode medium question