Java simplest in-place solution 0 ms faster than 100%
\nclass Solution {\n    // helper function to reverse array in-place:\n    void rev(int[] A) {\n        for(int i = 0; i < A.length / 2; i++)\n        {\n      
```\nclass Solution {\n    // helper function to reverse array in-place:\n    void rev(int[] A) {\n        for(int i = 0; i < A.length / 2; i++)\n        {\n            int temp = A[i];\n            A[i] = A[A.length - i - 1];\n            A[A.length - i - 1] = temp;\n        }\n    }\n    public int[][] flipAndInvertImage(int[][] A) {\n        for (int i=0; i<A.length; i++) {\n            rev(A[i]); // reverse the array\n            for (int j=0; j<A[i].length; j++) { // flip\n                A[i][j] ^= 0x1;\n            }\n        }\n        return A;\n    }\n}\n```
['Java']