Given a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not co...
分类:
其他好文 时间:
2015-04-06 15:29:43
阅读次数:
123
class Solution {
public:
vector<vector > subsets(vector &S) {
vector<vector> res;
vector list;
if(S.size()==0)
{
res.push_back(list);...
分类:
其他好文 时间:
2015-04-05 09:16:23
阅读次数:
136
题目:
Given a set of distinct integers, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.
The solution set must not contain duplicate subsets.
...
分类:
其他好文 时间:
2015-04-03 17:30:47
阅读次数:
107
题目:
Given a collection of integers that might contain duplicates, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.
The solution set must not ...
分类:
其他好文 时间:
2015-04-03 17:28:54
阅读次数:
107
Given a collection of integers that might contain duplicates,S, return all possible subsets.Note:Elements in a subset must be in non-descending order....
分类:
其他好文 时间:
2015-03-30 18:18:11
阅读次数:
113
题目链接:permutations
相似题型:
1. [LeetCode 39&40] Combination Sum I & II
2. [LeetCode 78] Subsets
3. [LeetCode 90] Subsets II
4. [LeetCode 22] Generate Parentheses
5. [LeetCod...
分类:
其他好文 时间:
2015-03-30 09:39:01
阅读次数:
165
题目链接:combinations
相似题型:
1. [LeetCode 39&40] Combination Sum I & II
2. [LeetCode 78] Subsets
3. [LeetCode 90] Subsets II
4. [LeetCode 22] Generate Parentheses
import java.util.A...
分类:
其他好文 时间:
2015-03-29 15:09:43
阅读次数:
153
题目链接:subsets
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
*
Given a set of distinct integers, S, return all possible subsets.
Note:
Elements in a su...
分类:
其他好文 时间:
2015-03-28 08:50:46
阅读次数:
100
题目链接:subsets-ii
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
*
Given a collection of integers that might co...
分类:
其他好文 时间:
2015-03-28 08:49:29
阅读次数:
106
问题来源:https://leetcode.com/problems/subsets/import java.util.ArrayList;
import java.util.Collections;
import java.util.List;/**
*
*
* ClassName Subsets
*
*
* Description Given a set...
分类:
其他好文 时间:
2015-03-21 11:21:12
阅读次数:
147