The Trade Desk Interview Question

leetcode medium and hard, cache optimisation