diff --git a/0130-surrounded-regions/README.md b/0130-surrounded-regions/README.md new file mode 100644 index 0000000..e55fd04 --- /dev/null +++ b/0130-surrounded-regions/README.md @@ -0,0 +1,40 @@ +

130. Surrounded Regions

Medium


You are given an m x n matrix board containing letters 'X' and 'O', capture regions that are surrounded:

+ + + +

A surrounded region is captured by replacing all 'O's with 'X's in the input matrix board.

+ +

 

+

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"]]

+ +

Explanation:

+ +

In the above diagram, the bottom region is not captured because it is on the edge of the board and cannot be surrounded.

+
+ +

Example 2:

+ +
+

Input: board = [["X"]]

+ +

Output: [["X"]]

+
+ +

 

+

Constraints:

+ +