package leetcode;

/**
 * https://leetcode.com/problems/flipping-an-image/
 */
public class Problem832 {
    public int[][] flipAndInvertImage(int[][] A) {
        // TODO
        return null;
    }

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

@@ -161,131 +161,380 @@
     
-// TODO%0A        return null;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Problem832 prob = new Problem832()
+int nRow = A.length;%0A        int nCol = 0;%0A        if (nRow %3E 0) %7B%0A            nCol = A%5B0%5D.length;%0A        %7D%0A        int%5B%5D%5B%5D result = new int%5BnRow%5D%5BnCol%5D;%0A        for (int i = 0; i %3C A.length; i++) %7B%0A            for (int j = 0, k = A.length - 1; j %3C A.length; j++, k--) %7B%0A                result%5Bi%5D%5Bk%5D = (A%5Bi%5D%5Bj%5D == 0) ? 1 : 0;%0A            %7D%0A        %7D%0A        return result
 ;%0A  

Solve problem 832