package leetcode;

/**
 * https://leetcode.com/problems/candy/
 */
public class Problem135 {
    public int candy(int[] ratings) {
        // TODO
        return 0;
    }

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

@@ -510,20 +510,298 @@
  2%7D)); // 4%0A
+        System.out.println(prob.candy(new int%5B%5D%7B3, 2, 2, 3%7D)); // 6%0A        System.out.println(prob.candy(new int%5B%5D%7B3, 2, 2, 2, 3%7D)); // 7%0A        System.out.println(prob.candy(new int%5B%5D%7B1, 2, 2, 1%7D)); // 6%0A        System.out.println(prob.candy(new int%5B%5D%7B1, 2, 2, 2, 1%7D)); // 7%0A
     %7D%0A%7D%0A

Update problem 135