LeetCode 130. Surrounded Regions – 彻底掌握并查集(Union Find)系列题13

Given an m x n matrix board containing 'X' and 'O', capture all regions that are 4-directionally surrounded by 'X'.
A region is captured by flipping all 'O's into 'X's in that surrounded region.
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: Surrounded regions should not be on the border, which means that any 'O' on the bord

LeetCode 130. Surrounded Regions – 彻底掌握并查集(Union Find)系列题13最先出现在Python成神之路

版权声明:
作者:主机优惠
链接:https://www.techfm.club/p/6946.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>