摘要:
1559. 二维网格图中探测环 class Solution { int[] dx={0,1,0,-1}; int[] dy={1,0,-1,0}; int n; int m; char[][] grid; boolean[][] vis; int startx; int starty; boole 阅读全文
摘要:
1020. 飞地的数量 class Solution { int[] dx={0,1,0,-1}; int[] dy={1,0,-1,0}; int n; int m; int[][] grid; boolean[][] vis; int res; public int numEnclaves(in 阅读全文
摘要:
733. 图像渲染 class Solution { int[] dx={0,1,0,-1}; int[] dy={1,0,-1,0}; int n; int m; int[][] image; boolean[][] vis; int color; int sourceColor; public 阅读全文
摘要:
https://leetcode.cn/problems/pacific-atlantic-water-flow/description/ class Solution { List<List<Integer>> res = new ArrayList<>(); int[] dx={0,1,0,-1 阅读全文