Bloomberg interview question

Data structures (Heaps, Trees), medium level leetcode. Live coding.