A recursive function to replace previous value ' prevV ' at ' ( x , ▁ y ) ' and all surrounding values of ( x , y ) with new value ' newV ' .
static void floodFillUtil ( char [ , ] mat , int x , int y , char prevV , char newV ) {