Pergunta de entrevista da empresa Goldman Sachs

Two problems, one was 2 sum other was LC easy