Example 1
- Input
- board = [["X","X","X","X"],["X","O","O","X"],["X","X","O","X"],["X","O","X","X"]]
- Output
- [["X","X","X","X"],["X","X","X","X"],["X","X","X","X"],["X","O","X","X"]]
The border (3,1) escapes capture and stays O, while the inland cells (1,1), (1,2) and (2,2) are surrounded and flip to X.