Bloomberg interview question

1. Leetcode Medium 2. Leetcode Medium