Bloomberg interview question

Leetcode type questions (medium to hard difficulty)