Java | Simple | Runtime: 0 ms, faster than 100.00% of Java online submissions
Kindly upvote if this solution helps you!\n\npublic int[][] flipAndInvertImage(int[][] image) {\n        for(int i =0; i< image.length; i++){\n            int s
Kindly upvote if this solution helps you!\n```\npublic int[][] flipAndInvertImage(int[][] image) {\n        for(int i =0; i< image.length; i++){\n            int start =0, end=image[i].length -1;\n\t\t\t//Flipping\n            while(start <= end){\n                int temp = image[i][end];\n                image[i][end] = image[i][start];\n                image[i][start] = temp;\n                start++;\n                end--;\n            }\n\t\t\t//Revert\n            for(int j =0; j< image[i].length; j++){\n                image[i][j] = (image[i][j] == 0) ? 1 : 0;\n            }\n        }\n        return image;\n    }\n```
['Java']