The Trade Desk interview question

leetcode medium and hard, cache optimisation