Pregunta de entrevista de Bloomberg

Medium Leetcode style question about arrays