Goldman Sachs Interview Question

leet code easy and medium