package leetcode;

/**
 * https://leetcode.com/problems/circular-array-loop/
 */
public class Problem457 {
    public boolean circularArrayLoop(int[] nums) {
        // TODO
        return false;
    }

    public static void main(String[] args) {
        Problem457 prob = new Problem457();
        System.out.println(prob.circularArrayLoop(new int[]{2, -1, 1, 2, 2})); // true
        System.out.println(prob.circularArrayLoop(new int[]{2, -1, 1, 1, 2})); // false
        System.out.println(prob.circularArrayLoop(new int[]{-1, 2})); // false
        System.out.println(prob.circularArrayLoop(new int[]{-1, 1})); // false
        System.out.println(prob.circularArrayLoop(new int[]{-1, -2})); // false
        System.out.println(prob.circularArrayLoop(new int[]{-1, -1, -2})); // true
        System.out.println(prob.circularArrayLoop(new int[]{1, -1})); // false
    }
}

@@ -856,20 +856,190 @@
 ); // false%0A
+        System.out.println(prob.circularArrayLoop(new int%5B%5D%7B3, 1, 2%7D)); // true%0A        System.out.println(prob.circularArrayLoop(new int%5B%5D%7B2, 1, -1, -2, -2%7D)); // false%0A
     %7D%0A%7D%0A

Update problem 457