MaxProfit

Given a log of stock prices compute the maximum possible earning.