Goldman Sachs Interview Question

Algorithms and time complexities