Pergunta de entrevista da empresa Cadence Sound

Q: Same as Leetcode #283