随笔分类 - 刷题笔记
摘要:前序中序,后序中序确定一颗二叉树。 后序中序确定的思路: 从postorder中取出最后一个数 以这个数为分界点分割中序数组 再根据中序的分组分割后序数组 点击查看代码 class Solution { Map<Integer,Integer> map = new HashMap<>(); publ
阅读全文
摘要:https://leetcode.cn/problems/path-sum-ii 点击查看代码 class Solution { public List<List<Integer>> pathSum(TreeNode root, int targetSum) { List<List<Integer>
阅读全文
浙公网安备 33010602011771号