Given a binary matrix, flip each row horizontally and then invert it (0→1, 1→0). Return the resulting matrix (LeetCode 832).
2D list of 0/1 ints.
2D list after flip+invert.
Example 1:
Input:
image = [[1,1,0],[1,0,1],[0,0,0]]
Output:
[[1,0,0],[0,1,0],[1,1,1]]
Example 2:
Input:
image = [[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]]
Example 3:
Input:
image = [[1]]
Output:
[[0]]