
LeetCode
文章平均质量分 63
LiQiyaoo
技术改变生活。
展开
-
3.Longest Substring Without Repeating Characters【LeetCode算法之旅3】
Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is "原创 2017-03-08 22:13:28 · 271 阅读 · 0 评论 -
78. Subsets 【LeetCode算法之旅之深度优先搜索】
Given a set of distinct integers, nums, return all possible subsets.Note: The solution set must not contain duplicate subsets.For example,If nums = [1,2,3], a solution is:[ [3], [1],原创 2017-03-09 20:14:04 · 559 阅读 · 0 评论 -
Leetcode上和DFS有关题目整理 (内含目录)
总结一下Leetcode上一些比较经典的利用dfs思路解的题:按照顺序排了一下,如果从第一道题一直做到最后一道题,会对dfs有一个新的认识。我们从最典型的开始,首先是关于数字集合的问题,例如输出所有子集,所有序列,我们把这些题当作dfs的基础。Subset I, IICombinationPermutation I, IICombination Co转载 2017-03-11 09:29:06 · 1989 阅读 · 0 评论 -
46. Permutations【LeetCode算法之旅之DFS】
Given a collection of distinct numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1原创 2017-03-11 09:35:28 · 554 阅读 · 0 评论