Pergunta de entrevista da empresa Bloomberg

three leetcode style questions over two interviews