Leetcode 200 Number of Islands
Problem:
Analysis
scan grid to find ‘1’
if ‘1’, then dfs or bfs and label
Code
class Solution1 {
// 1. scan grid 2.if ==1, dfs and label
final static int[][] dirs = {{1,0},{-1,0},{0,1},...
原创
2019-06-07 13:20:00 ·
88 阅读 ·
0 评论