@@ -0,0 +1,274 @@
+public class BestTimeToBuyAndSellStockII %7B%0A  public int maxProfit(int%5B%5D prices) %7B%0A    int total = 0;%0A%0A    for (int i = 0; i %3C prices.length - 1; i++) %7B%0A      if (prices%5Bi+1%5D %3E prices%5Bi%5D) %7B%0A        total += prices%5Bi+1%5D - prices%5Bi%5D;%0A      %7D%0A    %7D%0A    %0A    return total;%0A  %7D %0A%7D

Add best time to buy and sell stock