Pregunta de entrevista de Bloomberg

three leetcode style questions over two interviews