Pretty Simple Java Solution | Flip - 2 Pointers, Invert - Make 0 to 1 and vice versa
\nclass Solution {\n    public int[][] flipAndInvertImage(int[][] image) {\n        //flip\n        for(int i=0; i<image.length; i++){\n            int left=0, 
```\nclass Solution {\n    public int[][] flipAndInvertImage(int[][] image) {\n        //flip\n        for(int i=0; i<image.length; i++){\n            int left=0, right=image.length-1;\n            while(left<=right){\n                int temp = image[i][left];\n                image[i][left] = image[i][right];\n                image[i][right] = temp;\n                left++;right--;\n            }\n        }\n        \n        //invert\n        for(int i=0; i<image.length; i++){\n            for(int j=0; j<image.length; j++){\n                if(image[i][j]==0) image[i][j]=1;\n                else image[i][j]=0;\n            }\n        }\n        \n        return image;\n        \n    }\n}\n```
['Java']