Update BestTimeToBuyAndSellStockII.cpp

Another way to implement