写bug的小杨

导航

岛屿数量——BFS / DFS对比

DFS 解法 class Solution { public int numIslands(char[][] grid) { int count=0; for(int i=0;i<grid.length;i++){ for(int j=0;j<grid[0].length;j++){ if(grid

posted on 2021-01-20 22:45  迷途的小狗  阅读(71)  评论(0编辑  收藏  举报