阔达冬天

文章
3
资源
0
加入时间
3年0月28天

Leetcode130Surrounded Regions深度遍历并查集

Leetcode 130.被围绕的区域 深度遍历并查集深度遍历只从边界 ‘0’ 开始遍历,就不用考虑如何恢复没符合条件的标记class Solution { public void solve(char[][] board) { int n = board.length; if(n == 0) return; int m = board[0].length; /* 只从矩阵