Pergunta de entrevista da empresa Bloomberg

Medium Leetcode style question about arrays