随笔分类 -  dfs、bfs合集

47. Permutations II
摘要:Given a collection of numbers that might contain duplicates, return all possible unique permutations. Example: Input: [1,1,2] Output: [ [1,1,2], [1,2, 阅读全文

posted @ 2020-09-19 16:52 wsw_seu 阅读(72) 评论(0) 推荐(0) 编辑

78. 子集
摘要:https://leetcode-cn.com/problems/subsets/submissions/ 给定一组不含重复元素的整数数组 nums,返回该数组所有可能的子集(幂集)。 说明:解集不能包含重复的子集。 示例: 输入: nums = [1,2,3]输出:[ [3], [1], [2], 阅读全文

posted @ 2020-06-28 11:22 wsw_seu 阅读(172) 评论(0) 推荐(0) 编辑

127. 单词接龙
摘要:127. 单词接龙 https://leetcode-cn.com/problems/word-ladder/ func ladderLength(beginWord string, endWord string, wordList []string) int { i := 0 n := len(w 阅读全文

posted @ 2020-04-21 20:56 wsw_seu 阅读(167) 评论(0) 推荐(0) 编辑

200. 岛屿数量
摘要:200. 岛屿数量 https://leetcode-cn.com/problems/number-of-islands/ func numIslands(grid [][]byte) int { n := len(grid) if n == 0{ return 0 } //初始全部未访问过 fal 阅读全文

posted @ 2020-04-21 15:57 wsw_seu 阅读(134) 评论(0) 推荐(0) 编辑

导航

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8
点击右上角即可分享
微信分享提示