拿到矩形的外圈

拿到矩形的外圈

for (int i = 0; i < row; i++) {
	for (int j = 0; j < col; j++) {
		if (i == 0 || i == row - 1 || j == 0 || j == col - 1) {
			if (board[i][j] == 'O') {
				deque.offer(new Integer[]{i, j});
				isVisited[i][j] = true;
			}
		}
	}
}
posted @ 2023-09-14 09:49  爱新觉罗LQ  阅读(3)  评论(0编辑  收藏  举报