Pregunta de entrevista de CommScope

Leetcode like question around easy-medium