<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>二叉树 on Jeanphilo Blog</title><link>https://jeanphilogong.github.io/jeanblog/zh/tags/%E4%BA%8C%E5%8F%89%E6%A0%91/</link><description>Recent content in 二叉树 on Jeanphilo Blog</description><generator>Hugo -- 0.168.0</generator><language>zh-cn</language><lastBuildDate>Mon, 20 Apr 2026 09:37:25 +0800</lastBuildDate><atom:link href="https://jeanphilogong.github.io/jeanblog/zh/tags/%E4%BA%8C%E5%8F%89%E6%A0%91/index.xml" rel="self" type="application/rss+xml"/><item><title>Hot100：从前序与中序遍历序列构造二叉树（Construct Binary Tree from Preorder and Inorder Traversal）索引分治 ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/105-construct-binary-tree-from-preorder-and-inorder-traversal/</link><pubDate>Mon, 20 Apr 2026 09:37:25 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/105-construct-binary-tree-from-preorder-and-inorder-traversal/</guid><description>围绕 LeetCode 105 讲清前序负责定根、中序负责切左右的分工，以及如何用索引区间和哈希表把构树复杂度降到 O(n)。</description></item><item><title>Hot100：二叉树的右视图（Binary Tree Right Side View）层序遍历取每层最后一个 ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/199-binary-tree-right-side-view/</link><pubDate>Mon, 20 Apr 2026 09:37:25 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/199-binary-tree-right-side-view/</guid><description>围绕 LeetCode 199 讲清为什么右视图等价于“每层最后一个节点”，以及按层 BFS 和右优先 DFS 两种稳定写法。</description></item><item><title>Hot100：二叉树展开为链表（Flatten Binary Tree to Linked List）反向先序重连 ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/114-flatten-binary-tree-to-linked-list/</link><pubDate>Mon, 20 Apr 2026 09:37:25 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/114-flatten-binary-tree-to-linked-list/</guid><description>围绕 LeetCode 114 讲清为什么展开后的链表顺序就是先序遍历，以及如何用反向先序和 prev 指针把整棵树原地重连。</description></item><item><title>Hot100：二叉树中的最大路径和（Binary Tree Maximum Path Sum）树形 DP / 单边贡献 ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/124-binary-tree-maximum-path-sum/</link><pubDate>Mon, 20 Apr 2026 09:37:25 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/124-binary-tree-maximum-path-sum/</guid><description>围绕 LeetCode 124 讲清最大路径和的关键设计：递归向上只返回单边贡献，而经过当前节点的完整路径用来更新全局答案。</description></item><item><title>Hot100：二叉搜索树中第 K 小的元素（Kth Smallest Element in a BST）中序计数 / 提前停止 ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/230-kth-smallest-element-in-a-bst/</link><pubDate>Mon, 20 Apr 2026 09:37:25 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/230-kth-smallest-element-in-a-bst/</guid><description>围绕 LeetCode 230 讲清为什么 BST 的中序遍历天然有序，以及如何用显式栈做到边遍历边计数、命中第 k 个就提前停止。</description></item><item><title>Hot100：将有序数组转换为二叉搜索树（Convert Sorted Array to Binary Search Tree）分治选中点 ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/108-convert-sorted-array-to-binary-search-tree/</link><pubDate>Mon, 20 Apr 2026 09:37:25 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/108-convert-sorted-array-to-binary-search-tree/</guid><description>围绕 LeetCode 108 讲清为什么每次选中点就能同时满足 BST 有序性和平衡性，以及索引分治写法为什么最稳定。</description></item><item><title>Hot100：二叉树的直径（Diameter of Binary Tree）树形 DP / 高度回传 ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/543-diameter-of-binary-tree/</link><pubDate>Sun, 19 Apr 2026 14:52:28 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/543-diameter-of-binary-tree/</guid><description>围绕 LeetCode 543 讲清二叉树直径的核心：递归返回高度、在当前节点更新全局直径，以及为什么最长路径不一定只看根到叶。</description></item><item><title>Hot100：二叉树的最近公共祖先（Lowest Common Ancestor of a Binary Tree）后序返回值语义 ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/236-lowest-common-ancestor-of-a-binary-tree/</link><pubDate>Sun, 19 Apr 2026 14:52:28 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/236-lowest-common-ancestor-of-a-binary-tree/</guid><description>围绕 LeetCode 236 讲清最近公共祖先的后序返回值语义：子树返回什么、什么时候当前节点成为答案、以及为什么节点自己也可以是祖先。</description></item><item><title>Hot100：验证二叉搜索树（Validate Binary Search Tree）区间约束 / 中序判序 ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/98-validate-binary-search-tree/</link><pubDate>Sun, 19 Apr 2026 14:52:28 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/98-validate-binary-search-tree/</guid><description>围绕 LeetCode 98 讲清 BST 的祖先区间约束、不只和父节点比较的核心原因，以及区间递归与中序判序两种稳定写法。</description></item><item><title>Hot100：二叉树的层序遍历（Binary Tree Level Order Traversal）BFS / DFS ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/102-binary-tree-level-order-traversal/</link><pubDate>Sun, 15 Mar 2026 21:29:44 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/102-binary-tree-level-order-traversal/</guid><description>讲透 LeetCode 102 的按层 BFS、层宽控制与 DFS depth bucket 备选方案，附工程迁移和多语言实现。</description></item><item><title>Hot100：对称二叉树（Symmetric Tree）镜像递归 / BFS ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/101-symmetric-tree/</link><pubDate>Sun, 15 Mar 2026 21:29:43 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/101-symmetric-tree/</guid><description>围绕 LeetCode 101 讲清镜像递归、BFS 成对入队与树形结构对称校验，附工程迁移和多语言实现。</description></item><item><title>相同的树（Same Tree）同步递归 / BFS ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/100-same-tree/</link><pubDate>Sun, 15 Mar 2026 21:29:42 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/100-same-tree/</guid><description>围绕 LeetCode 100 讲清同步递归比较、队列成对校验与结构等价判断，附工程迁移与多语言实现。</description></item><item><title>Hot100：翻转二叉树（Invert Binary Tree）递归 / BFS ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/226-invert-binary-tree/</link><pubDate>Fri, 06 Mar 2026 17:58:23 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/226-invert-binary-tree/</guid><description>围绕 LeetCode 226 讲清树镜像变换、递归交换左右子树的本质，以及工程里的结构镜像场景。</description></item><item><title>Hot100：二叉树的最大深度（Maximum Depth of Binary Tree）DFS / BFS ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/104-maximum-depth-of-binary-tree/</link><pubDate>Fri, 06 Mar 2026 17:58:22 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/104-maximum-depth-of-binary-tree/</guid><description>讲透 LeetCode 104 的深度定义、递归 DFS 与层序 BFS 两种主流解法，附工程迁移和多语言实现。</description></item><item><title>Hot100：二叉树的中序遍历（Binary Tree Inorder Traversal）递归 / 显式栈 ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/94-binary-tree-inorder-traversal/</link><pubDate>Fri, 06 Mar 2026 17:58:21 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/94-binary-tree-inorder-traversal/</guid><description>用左-根-右模板讲透 LeetCode 94，覆盖递归、显式栈与工程迁移场景，附多语言可运行实现。</description></item><item><title>Hot100：路径和 III 前缀和 + 哈希表统计向下路径（LeetCode 437）ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/437-path-sum-iii/</link><pubDate>Mon, 02 Feb 2026 22:13:45 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/437-path-sum-iii/</guid><description>用前缀和 + 计数哈希表在 O(n) 时间统计二叉树中和为 targetSum 的向下路径数，含推导、工程迁移与多语言实现。</description></item></channel></rss>