摘要:
https://leetcode.cn/problems/combination-sum-ii/description/ class Solution { List<List<Integer>> res = new ArrayList<>(); LinkedList<Integer> path = 阅读全文
摘要:
https://leetcode.cn/problems/combination-sum/description/ 两种搜索思路 一种是选或不选,搜索树是一颗二叉树另一种是选哪个数,是一个n叉树 二叉 class Solution { List<List<Integer>> res = new Ar 阅读全文
摘要:
https://leetcode.cn/problems/trim-a-binary-search-tree/description/ 要点是区分在区间左边还是右边,在区间左边那么右子树也还有必要去查找删除,右边同理,返回的是删除后新树的根节点 要注意函数要实现单层逻辑和完成闭环语义 class S 阅读全文