package leetcode;

import java.util.Arrays;

/**
 * https://leetcode.com/problems/diagonal-traverse/
 */
public class Problem498 {
    public int[] findDiagonalOrder(int[][] matrix) {
        // TODO
        return new int[0];
    }

    public static void main(String[] args) {
        Problem498 prob = new Problem498();
        System.out.println(Arrays.toString(prob.findDiagonalOrder(new int[][]{
            {1, 2, 3},
            {4, 5, 6},
            {7, 8, 9}
        }))); // [1,2,4,7,5,3,6,8,9]
    }
}

@@ -500,16 +500,221 @@
 ,6,8,9%5D%0A
+        System.out.println(Arrays.toString(prob.findDiagonalOrder(new int%5B%5D%5B%5D%7B%0A            %7B1, 2, 3, 4%7D,%0A            %7B5, 6, 7, 8%7D,%0A            %7B9, 10, 11, 12%7D%0A        %7D))); // %5B1,2,5,9,6,3,4,7,10,11,8,12%5D%0A
     %7D%0A%7D%0A

Update problem 498