Domanda di colloquio di Goldman Sachs

Two problems, one was 2 sum other was LC easy