update the BestTimeStockIII, which is a perfect example of DP