Given an n x n binary matrix image, flip the image horizontally (reverse each row), then invert it (replace 0 with 1 and 1 with 0). Return the resulting image.
Input: An n x n binary matrix image.
Output: The image after horizontal flip and inversion.
Input: [[1,1,0],[1,0,1],[0,0,0]]
Output: [[1,0,0],[0,1,0],[1,1,1]]
Explanation: Flip rows: [[0,1,1],[1,0,1],[0,0,0]]. Invert: [[1,0,0],[0,1,0],[1,1,1]].Input: [[1,1,0,0],[1,0,0,1],[0,1,1,1],[1,0,1,0]]
Output: [[1,1,0,0],[0,1,1,0],[0,0,0,1],[1,0,1,0]]
Explanation: Flip then invert each row.Input: [[0]]
Output: [[1]]
Explanation: Flip [0]→[0]. Invert [0]→[1].n == image.length == image[i].length1 <= n <= 20image[i][j] is 0 or 1