Could someone give me another example of the question -solution relation? I don't seem to understand the problem.
X X X X X O O X X X O X X O X X
how can we disregard '0' at [1,1]? It is clearly not surrounded by all 'X'.
That means if a group of 'O' are exactly surrounded by 'X', then all 'O' in this group will be changed to 'X'
So these 'O': [1,1], [1,2], [2,2] are belong to one group, because they are connected
The last one 'O': [3,1] is another group.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.