You have an NxN square with containing a number of squares also equal to N^2 (checker board basically).
You have a function that allows change any area i1,j1 to i2,j2 from white to black, black to white, or invert all color patterns.
What's the minimum number of times you must call the function to make a checkboard pattern?