Back to the Problem
Sweep with the minimum price so far; the best sale at day i is pi − that minimum.
Complexity: O(N)