摘要: 2024年7月25日 题39. 组合总和 由于每个元素可以用多次,要想到在每次递归里还要循环即可。 代码首先给各个候选排序,从小到大依次提高门槛,每次回溯就提高index。 class Solution { List<List<Integer>> res; List<Integer> path; i 阅读全文
posted @ 2024-07-27 14:10 hailicy 阅读(2) 评论(0) 推荐(0) 编辑