Goldman Sachs interview question

Not so difficult