Goldman Sachs interview question

Coding with a simply trading program