Refactor
Refactor best time to buy and sell stock III