README ¶ 算法与题目对照表 算法 对应题目 题解 深度优先搜索 144. 二叉树的前序遍历 (binary-tree-preorder-traversal) 题解 145. 二叉树的后序遍历 (binary-tree-postorder-traversal) 题解 94. 二叉树的中序遍历 (binary-tree-inorder-traversal) 题解 226. 翻转二叉树 (invert-binary-tree) 题解 100. 相同的树 (same-tree) 题解 101. 对称二叉树 (symmetric-tree) 题解 104. 二叉树的最大深度 (maximum-depth-of-binary-tree) 题解 513. 找树左下角的值 (find-bottom-left-tree-value) 题解 112. 路径总和 (path-sum) 题解 654. 最大二叉树 (maximum-binary-tree) 题解 617. 合并二叉树 (merge-two-binary-trees) 题解 236. 二叉树的最近公共祖先 (lowest-common-ancestor-of-a-binary-tree) 题解 广度优先搜索 102. 二叉树的层序遍历 (binary-tree-level-order-traversal) 题解 二叉搜索树 700. 二叉搜索树中的搜索 (search-in-a-binary-search-tree) 题解 98. 验证二叉搜索树 (validate-binary-search-tree) 题解 530. 二叉搜索树的最小绝对差 (minimum-absolute-difference-in-bst) 题解 501. 二叉搜索树中的众数 (find-mode-in-binary-search-tree) 题解 235. 二叉搜索树的最近公共祖先 (lowest-common-ancestor-of-a-binary-search-tree) 题解 701. 二叉搜索树中的插入操作 (insert-into-a-binary-search-tree) 题解 450. 删除二叉搜索树中的节点 (delete-node-in-a-bst) 题解 669. 修剪二叉搜索树 (trim-a-binary-search-tree) 题解 108. 将有序数组转换为二叉搜索树 (convert-sorted-array-to-binary-search-tree) 题解 538. 把二叉搜索树转换为累加树 (convert-bst-to-greater-tree) 题解 Expand ▾ Collapse ▴ Directories ¶ Show internal Expand all Path Synopsis balanced-binary-tree binary-tree-inorder-traversal binary-tree-level-order-traversal binary-tree-paths binary-tree-postorder-traversal binary-tree-preorder-traversal construct-binary-tree-from-inorder-and-postorder-traversal convert-bst-to-greater-tree convert-sorted-array-to-binary-search-tree count-complete-tree-nodes delete-node-in-a-bst find-bottom-left-tree-value find-mode-in-binary-search-tree insert-into-a-binary-search-tree invert-binary-tree lowest-common-ancestor-of-a-binary-search-tree lowest-common-ancestor-of-a-binary-tree maximum-binary-tree maximum-depth-of-binary-tree merge-two-binary-trees minimum-absolute-difference-in-bst minimum-depth-of-binary-tree path-sum search-in-a-binary-search-tree sum-of-left-leaves symmetric-tree trim-a-binary-search-tree validate-binary-search-tree Click to show internal directories. Click to hide internal directories.