Bloomberg interview question

leetcode questions, look at leetcode discussions.