码迷,mamicode.com
首页 >  
搜索关键字:surrounded    ( 192个结果
被围绕的区域 · Surrounded Regions
[抄题]: 给一个二维的矩阵,包含 'X' 和 'O', 找到所有被 'X' 围绕的区域,并用 'X' 填充满。 样例 给出二维矩阵: X X X X X O O X X X O X X O X X 把被 'X' 围绕的区域填充之后变为: X X X X X X X X X X X X X O X ...
分类:其他好文   时间:2018-02-19 12:19:49    阅读次数:132
Pku2750 Potted Flower
Description The little cat takes over the management of a new park. There is a large circular statue in the center of the park, surrounded by N pots o ...
分类:其他好文   时间:2018-02-05 00:24:16    阅读次数:213
python 学习 leetcode ---number of island
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 ...
分类:编程语言   时间:2017-11-17 00:05:14    阅读次数:247
[LeetCode] BFS解决的题目
一.130 Surrounded Regions(https://leetcode.com/problems/surrounded-regions/description/) 题目: 解法: 这道题的意思是将所有被X包围的O都变为X(边缘的不算),我们可以维护一个队列,先把四周的O的位置放进队列中, ...
分类:其他好文   时间:2017-11-14 21:20:12    阅读次数:179
搜索类题目的高效实现
BFS 类问题 1 Surrounded Regions public void surroundedRegions(char[][] board) { int n = board.length; if (n == 0) { return; } int m = board[0].length; fo ...
分类:其他好文   时间:2017-10-31 12:59:36    阅读次数:211
POJ 3525 Most Distant Point from the Sea (半平面交)
Description The main land of Japan called Honshu is an island surrounded by the sea. In such an island, it is natural to ask a question: “Where is the ...
分类:其他好文   时间:2017-10-13 12:44:58    阅读次数:199
[LeetCode] Number of Islands
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 ...
分类:其他好文   时间:2017-10-10 14:43:04    阅读次数:165
130. Surrounded Regions
public class Solution { public void solve(char[][] board) { if (board.length == 0 || board[0].length == 0) return; int m = board.length; int n = board... ...
分类:其他好文   时间:2017-10-04 14:31:33    阅读次数:185
200. Number of Islands
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 ...
分类:其他好文   时间:2017-10-01 19:04:20    阅读次数:135
[LintCode] Surrounded Regions
Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by flipping all 'O''s into 'X''s in that surround ...
分类:其他好文   时间:2017-09-27 10:21:16    阅读次数:215
192条   上一页 1 2 3 4 5 ... 20 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!