Pergunta de entrevista da empresa Goldman Sachs

Standard leetcode question to code