![](https://img-blog.csdnimg.cn/20190927151026427.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Leetcode
leetcode实战
TigRer
探索未来的程序汪
展开
-
全排列
46. 全排列class Solution { public List<List<Integer>> permute(int[] nums) { List<List<Integer>> res = new ArrayList<>(); int len = nums.length; if (len == 0) return res; boolean[] used = new b原创 2021-04-26 21:55:07 · 80 阅读 · 0 评论 -
岛屿问题
200. 岛屿数量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[i][j] == '1') {原创 2021-04-26 20:55:43 · 75 阅读 · 0 评论