随笔分类 -  刷题笔记

摘要:前序中序,后序中序确定一颗二叉树。 后序中序确定的思路: 从postorder中取出最后一个数 以这个数为分界点分割中序数组 再根据中序的分组分割后序数组 点击查看代码 class Solution { Map<Integer,Integer> map = new HashMap<>(); publ 阅读全文
posted @ 2024-03-26 00:03 taolll 阅读(20) 评论(0) 推荐(0)
摘要:https://leetcode.cn/problems/path-sum-ii 点击查看代码 class Solution { public List<List<Integer>> pathSum(TreeNode root, int targetSum) { List<List<Integer> 阅读全文
posted @ 2024-03-24 22:44 taolll 阅读(13) 评论(0) 推荐(0)