Bloomberg Interview Question

Bloomberg tagged on Leetcode and variations