Goldman Sachs Interview Question

Coding with a simply trading program