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

add no.122