Domanda di colloquio di Goldman Sachs

the question was leet code easy