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 adjacent ...
分类:
其他好文 时间:
2015-04-08 14:31:36
阅读次数:
122
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 surrounded region...
分类:
其他好文 时间:
2015-04-05 20:14:30
阅读次数:
147
题目:Surrounded Regions
广搜和深搜都能解决,但是LeetCode上使用深搜时会栈溢出
DFS:
/*LeetCode Surrounded Regions
* 题目:给定一个字符数组,由'X'和'O'组成,找到所有被x包围的o并将其替换为x
* 思路:只要替换被包围的o就行,如果有一个o是边界或者上下左右中有一个是o且这个o不会被替换,则该点也不会被替换
* 从四条...
分类:
其他好文 时间:
2015-03-29 00:42:51
阅读次数:
204
目录
目录
前言
题目
思路1DFS
思路2BFS
前言
最近这两天为了解决Android Rom适配一个底层的问题,天天熬夜到2点,导致原定了LeetCode刷题计划都受到了影响。昨晚终于熬夜搞定,补充一道LeetCode解题报告。
题目
Given a 2D board containing ‘X’ and ‘O’, capture all regions sur...
分类:
其他好文 时间:
2015-03-20 20:29:23
阅读次数:
127
方法1:
SQL> select tname from tab wheretabtype='TABLE';
TNAME
------------------------------------------------------------
REGIONS
LOCATIONS
JOB_HISTORY
JOBS
EMPLOYEES
DEPARTMENTS
COUNTRI...
分类:
数据库 时间:
2015-03-19 18:32:09
阅读次数:
168
Problem Description
There are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts of the island. But unfortunately, these maps describe different regions of Atlantis. Your frie...
分类:
编程语言 时间:
2015-03-17 12:34:18
阅读次数:
182
C674X_0: Loader: One or more sections ofyour program falls into a memory region that is not writable. These regions will not actually be written tothe target. Check your linkerconfiguration and/or memory map.
C674X_0: Trouble Writing Register PC:(Error -...
分类:
其他好文 时间:
2015-03-17 10:24:49
阅读次数:
200
One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in which the core regions ...
分类:
其他好文 时间:
2015-03-05 20:48:47
阅读次数:
149
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 surrounded region.
For example,
X X X X
X O O X...
分类:
其他好文 时间:
2015-03-02 19:07:23
阅读次数:
115
Beijing was once surrounded by four rings of city walls: the Forbidden City Wall, the Imperial City Wall, the Inner City Wall, and finally the Outer C...
分类:
其他好文 时间:
2015-02-27 16:27:30
阅读次数:
183