写bug的小杨

导航

2021年1月20日 #

岛屿数量——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 @ 2021-01-20 22:45 迷途的小狗 阅读(71) 评论(0) 推荐(0) 编辑