
Arts
文章平均质量分 64
--所念皆星河--
这个作者很懒,什么都没留下…
展开
-
Arts挑战-2022-04-10-第三周
Algorithm 题解: 使用回溯算法将每种组合都进行尝试 源码 public List<List<Integer>> combinationSum2(int[] candidates, int target) { List<List<Integer>> lists = new ArrayList<>(); Stack<Integer> stack = new Stack<>();原创 2022-04-10 21:26:21 · 305 阅读 · 0 评论 -
ARTS挑战-20220331-第二周
Algorithm 题解: 一、 因为题目有说到先序遍历,我的思路就全是先序遍历了,然后得到数组,再遍历数组 源码 public void flatten(TreeNode root) { List<Integer> list = new ArrayList<Integer>(); help(root, list); TreeNode temp = root; for(int i =1; i<list.size(原创 2022-04-03 15:59:54 · 443 阅读 · 0 评论