Goldman Sachs Interview Question

1. Stock buy sell problem