mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-09 03:34:02 +08:00
Merge pull request #1614 from zhicheng-lee/zhicheng-lee-patch-3
更新 0078.子集.md 去除Java代码中冗余的部分
This commit is contained in:
@ -180,10 +180,6 @@ class Solution {
|
|||||||
List<List<Integer>> result = new ArrayList<>();// 存放符合条件结果的集合
|
List<List<Integer>> result = new ArrayList<>();// 存放符合条件结果的集合
|
||||||
LinkedList<Integer> path = new LinkedList<>();// 用来存放符合条件结果
|
LinkedList<Integer> path = new LinkedList<>();// 用来存放符合条件结果
|
||||||
public List<List<Integer>> subsets(int[] nums) {
|
public List<List<Integer>> subsets(int[] nums) {
|
||||||
if (nums.length == 0){
|
|
||||||
result.add(new ArrayList<>());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
subsetsHelper(nums, 0);
|
subsetsHelper(nums, 0);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user