Domanda di colloquio di Bloomberg

One leetcode problem, and optimized solution of the problem.