Goldman Sachs interview question

Algorithms and time complexities