Q1.
Assume we are making a tic-tac-toe game.
I.
Now as the game progresses, we continuously need to keep track of the filled and unfilled cells of our grid. For that, create a 2D array to represent the following tic-tac-toe game state.

II.
Now let’s say that the next player put O in the first row at the middle position, so fill that slot with the given input in our array as well.