![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
回溯
ying______
这个作者很懒,什么都没留下…
展开
-
LeetCode 216 : Combination Sum III
问题描述Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be a unique set of numbers.Note:All numbers wi...原创 2020-03-18 10:57:21 · 129 阅读 · 0 评论 -
LeetCode 131 : Palindrome Partitioning
问题描述Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.Example:Input: “aab”Output:[[“aa”,“b”],[“a”,“a”,“b...原创 2020-03-18 10:29:03 · 99 阅读 · 0 评论 -
LeetCode 93. Restore IP Addresses
问题描述Given a string containing only digits, restore it by returning all possible valid IP address combinations.Example:Input: “25525511135”Output: [“255.255.11.135”, “255.255.111.35”]java实现class ...原创 2020-03-18 00:29:59 · 123 阅读 · 0 评论 -
LeetCode 17 : Letter Combinations of a Phone Number
问题描述Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is...原创 2020-03-18 00:21:38 · 129 阅读 · 0 评论 -
LeetCode 46 : Permutations && LeetCode 47: Permutations II
问题描述Given a collection of distinct integers, return all possible permutations.Example:Input: [1,2,3]Output:[[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]思路实现class Solution { publ...原创 2019-06-09 23:15:04 · 102 阅读 · 0 评论 -
LeetCode 39 && 40 : Combination Sum && Combination Sum II
39 题目描述Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.The same...原创 2019-06-30 21:48:56 · 100 阅读 · 0 评论 -
LeetCode 78: Subsets && LeetCode 90: Subsets II
问题描述Given a set of distinct integers, nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.Example:Input: nums = [1,2,3]Output:[[3],[1],...原创 2019-08-24 22:46:39 · 104 阅读 · 0 评论