You are given an m $ imes$ n binary matrix grid.
A row or column is considered palindromic if its elements read the same forwards and backwards.
In one operation, you can flip any cell in grid from
Return the minimum number of flips required to make either all rows palindromic or all columns palindromic.
Constraints:
m grid.length
n grid[i].length
m * n
grid[i][j]
You are given an m $ imes$ n binary matrix grid.
A row or column is considered palindromic if its elements read the same forwards and backwards.
In one operation, you can flip any cell in grid from
Return the minimum number of flips required to make either all rows palindromic or all columns palindromic.
Constraints:
m grid.length
n grid[i].length
m * n
grid[i][j]