Min Flips Binary Grid Palindromic

You are given an m x n binary matrix grid. A row is palindromic if it reads the same forwards and backwards. A column is palindromic if it reads the same top to bottom and bottom to top. In one operation, flip any cell from 0 to 1 or 1 to 0. Return the minimum flips required to make either all rows palindromic OR all columns palindromic.

Examples
Input: [[1,0,0],[0,0,0],[0,0,1]]
Output: 2
Hints

Min Flips Binary Grid Palindromic

You are given an m x n binary matrix grid. A row is palindromic if it reads the same forwards and backwards. A column is palindromic if it reads the same top to bottom and bottom to top. In one operation, flip any cell from 0 to 1 or 1 to 0. Return the minimum flips required to make either all rows palindromic OR all columns palindromic.