Pregunta de entrevista de Intel Corporation

generic leetcode question about colored balls