Pergunta de entrevista da empresa Bloomberg

There was no OA, and the interview was a leetcode medium.