算法描述: Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X ...
分类:
其他好文 时间:
2019-02-05 22:12:46
阅读次数:
108
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen ...
分类:
其他好文 时间:
2019-01-28 21:18:37
阅读次数:
141
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen ...
分类:
其他好文 时间:
2018-11-29 20:14:39
阅读次数:
137
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen... ...
分类:
其他好文 时间:
2018-11-06 11:02:41
阅读次数:
112
一、题目 1、审题 2、分析 给出一个二维数组,数组中只包含字符 'O'、‘X', 将数组中被 'X' 包围的 'O' 全部换成 'X'。(其中紧邻边界不算包围) 二、解答 1、思路: 方法一、 ①、将紧挨着棋盘边缘的 "O'" 或者与边缘的 "O" 连通的 “O” 全部换成 “1“; ②、将剩下的 ...
分类:
其他好文 时间:
2018-10-08 13:59:29
阅读次数:
142
Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X's in ... ...
分类:
其他好文 时间:
2018-09-20 18:46:34
阅读次数:
164
Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X's in ...
分类:
其他好文 时间:
2018-08-08 00:33:15
阅读次数:
169
The map of Berland is a rectangle of the size n?×?m, which consists of cells of size 1?×?1. Each cell is either land or water. The map is surrounded b ...
分类:
其他好文 时间:
2018-03-29 00:16:12
阅读次数:
195
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen ...
分类:
其他好文 时间:
2018-03-01 11:52:20
阅读次数:
233
Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X's in ...
分类:
其他好文 时间:
2018-02-26 23:16:37
阅读次数:
192