Merge pull request #1614 from zhicheng-lee/zhicheng-lee-patch-3

更新 0078.子集.md 去除Java代码中冗余的部分
This commit is contained in:
程序员Carl
2022-09-04 10:46:07 +08:00
committed by GitHub

View File

@ -180,10 +180,6 @@ class Solution {
List<List<Integer>> result = new ArrayList<>();// 存放符合条件结果的集合
LinkedList<Integer> path = new LinkedList<>();// 用来存放符合条件结果
public List<List<Integer>> subsets(int[] nums) {
if (nums.length == 0){
result.add(new ArrayList<>());
return result;
}
subsetsHelper(nums, 0);
return result;
}