package leetcode;

/**
 * https://leetcode.com/problems/fruit-into-baskets/
 */
public class Problem904 {
    public int totalFruit(int[] tree) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem904 prob = new Problem904();
    }
}

@@ -269,16 +269,329 @@
 m904();%0A
+        System.out.println(prob.totalFruit(new int%5B%5D%7B1, 2, 1%7D)); // 3%0A        System.out.println(prob.totalFruit(new int%5B%5D%7B0, 1, 2, 2%7D)); // 3%0A        System.out.println(prob.totalFruit(new int%5B%5D%7B1, 2, 3, 2, 2%7D)); // 4%0A        System.out.println(prob.totalFruit(new int%5B%5D%7B3, 3, 3, 1, 2, 1, 1, 2, 3, 3, 4%7D)); // 5%0A
     %7D%0A%7D%0A

Update problem 904