MaxProfit implemented.