Goldman Sachs Interview Question

Leetcode easy and medium. Data structures.