The Trade Desk interview question

Standard Data Structure Question (Leetcode type).