@@ -0,0 +1,415 @@
+%0Apublic class _309BestTimeToBuyAndSellStockWithCooldown %7B%0A    public int maxProfit(int%5B%5D prices) %7B%0A    %09int sell = 0, prev_sell = 0, buy = Integer.MIN_VALUE, prev_buy;%0A        for (int price : prices) %7B%0A            prev_buy = buy;%0A            buy = Math.max(prev_sell - price, prev_buy);%0A            prev_sell = sell;%0A            sell = Math.max(prev_buy + price, prev_sell);%0A        %7D%0A        return sell;%0A    %7D%0A%7D%0A

Add 309 solution