更新 0078.子集.md 去除Java代码中冗余的部分

subsetsHelper(int[] nums, int startIndex)函数的第一行包含了被去除代码的功能,因此去掉主函数中冗余的代码
This commit is contained in:
zhicheng lee
2022-08-31 09:52:46 +08:00
committed by GitHub
parent 12ca9f9b61
commit 814ea3ec47

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;
}