package leetcode;

import java.util.Arrays;

/**
 * https://leetcode.com/problems/shortest-path-with-alternating-colors/
 */
public class Problem1129 {
    public int[] shortestAlternatingPaths(int n, int[][] red_edges, int[][] blue_edges) {
        // TODO
        return null;
    }

    public static void main(String[] args) {
        Problem1129 prob = new Problem1129();
        System.out.println(Arrays.toString(prob.shortestAlternatingPaths(3,
            new int[][]{{0, 1}, {1, 2}}, new int[][]{}))); // [0,1,-1]
        System.out.println(Arrays.toString(prob.shortestAlternatingPaths(3,
            new int[][]{{0, 1}}, new int[][]{{2, 1}}))); // [0,1,-1]
        System.out.println(Arrays.toString(prob.shortestAlternatingPaths(3,
            new int[][]{{1, 0}}, new int[][]{{2, 1}}))); // [0,-1,-1]
        System.out.println(Arrays.toString(prob.shortestAlternatingPaths(3,
            new int[][]{{0, 1}}, new int[][]{{1, 2}}))); // [0,1,2]
        System.out.println(Arrays.toString(prob.shortestAlternatingPaths(3,
            new int[][]{{0, 1}, {0, 2}}, new int[][]{{1, 0}}))); // [0,1,1]
    }
}

@@ -1104,16 +1104,178 @@
 %5B0,1,1%5D%0A
+        System.out.println(Arrays.toString(prob.shortestAlternatingPaths(4,%0A            new int%5B%5D%5B%5D%7B%7B0, 1%7D, %7B1, 2%7D, %7B3, 2%7D%7D, new int%5B%5D%5B%5D%7B%7B1, 3%7D%7D))); // %5B0,1,3,2%5D%0A
     %7D%0A%7D%0A

Update problem 1129