Citadel Securities interview question

leetcode easy to mid question