Function to return the minimum number of slips required such that the matrix contains at least a single submatrix of size 2 * 2 with all equal elements
static int minFlips ( String [ ] mat , int r , int c ) {