package leetcode;

/**
 * https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/
 */
public class Problem309 {
    public int maxProfit(int[] prices) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem309 prob = new Problem309();
        System.out.println(prob.maxProfit(new int[]{1, 2, 3, 0, 2})); // 3
    }
}

@@ -372,16 +372,307 @@
 ); // 3%0A
+        System.out.println(prob.maxProfit(new int%5B%5D%7B1, 2, 3, 0, 2, 4%7D)); // 5%0A        System.out.println(prob.maxProfit(new int%5B%5D%7B3, 2, 1%7D)); // 0%0A        System.out.println(prob.maxProfit(new int%5B%5D%7B1, 2, 3%7D)); // 2%0A        System.out.println(prob.maxProfit(new int%5B%5D%7B3, 0, 0, 0, 5%7D)); // 5%0A
     %7D%0A%7D%0A

Update problem 309