![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树
Ber03
:)
展开
-
[LeetCode] 654. Maximum Binary Tree
原题链接:1. 题目介绍2. 解题思路原创 2019-07-17 11:32:05 · 108 阅读 · 0 评论 -
[LeetCode] 113. Path Sum II
原题链接:?原创 2019-06-11 19:24:06 · 180 阅读 · 0 评论 -
[LeetCode] 897. Increasing Order Search Tree
原题链接: https://leetcode.com/problems/increasing-order-search-tree/原创 2019-06-11 16:46:31 · 220 阅读 · 0 评论 -
[LeetCode] 865. Smallest Subtree with all the Deepest Nodes
原题链接:https://leetcode.com/problems/smallest-subtree-with-all-the-deepest-nodes/1. 题目介绍Given a binary tree rooted at root, the depth of each node is the shortest distance to the root.A node is deepe...原创 2019-06-17 02:01:54 · 206 阅读 · 0 评论 -
[LeetCode] 98. Validate Binary Search Tree
原题链接:https://leetcode.com/problems/validate-binary-search-tree/1. 题目介绍Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree o...原创 2019-06-05 01:59:54 · 132 阅读 · 0 评论 -
[LeetCode] 572. Subtree of Another Tree
原题链接:原创 2019-06-16 21:06:22 · 169 阅读 · 0 评论 -
[LeetCode] 1022. Sum of Root To Leaf Binary Numbers
原题链接原创 2019-06-16 17:37:02 · 316 阅读 · 0 评论 -
[LeetCode] 129. Sum Root to Leaf Numbers
原题链接原创 2019-06-16 17:00:21 · 190 阅读 · 0 评论 -
[LeetCode] 652. Find Duplicate Subtrees
原题链接:https://leetcode.com/problems/find-duplicate-subtrees/1. 题目介绍Given a binary tree, return all duplicate subtrees. For each kind of duplicate subtrees, you only need to return the root node of an...原创 2019-06-10 22:04:39 · 237 阅读 · 0 评论 -
[LeetCode] 101. Symmetric Tree
原题链接:https://leetcode.com/problems/symmetric-tree/1. 题目介绍Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).给定一个二叉树,检查是否是中心对称的。For example, this binary t...原创 2019-06-15 12:52:04 · 139 阅读 · 0 评论 -
[LeetCode] 437. Path Sum III
原题链接原创 2019-06-15 03:02:35 · 147 阅读 · 0 评论 -
[LeetCode] 563. Binary Tree Tilt
原题链接:原创 2019-06-11 23:25:38 · 150 阅读 · 0 评论 -
[LeetCode] 108. Convert Sorted Array to Binary Search Tree
原题链接:1. 题目介绍2. 解题思路原创 2019-06-30 09:48:05 · 132 阅读 · 0 评论 -
[LeetCode] 701. Insert into a Binary Search Tree
原题链接:原创 2019-06-29 22:08:06 · 159 阅读 · 0 评论 -
[LeetCode] 107. Binary Tree Level Order Traversal II
原题链接:1. 题目介绍2. 解题思路原创 2019-06-29 17:59:07 · 131 阅读 · 0 评论 -
[LeetCode] 106. Construct Binary Tree from Inorder and Postorder Traversal
原题链接:1. 题目介绍2. 解题思路原创 2019-06-28 17:35:23 · 135 阅读 · 0 评论 -
[LeetCode] 105. Construct Binary Tree from Preorder and Inorder Traversal
原题链接:原创 2019-06-28 16:11:16 · 159 阅读 · 0 评论 -
[LeetCode] 103. Binary Tree Zigzag Level Order Traversal
原题链接:原创 2019-06-27 13:06:31 · 169 阅读 · 0 评论 -
[LeetCode] 116. Populating Next Right Pointers in Each Node
原题链接:原创 2019-07-02 23:34:42 · 135 阅读 · 0 评论 -
[LeetCode] 114. Flatten Binary Tree to Linked List
原题链接:1. 题目介绍2. 解题思路原创 2019-07-01 23:45:36 · 132 阅读 · 0 评论 -
[LeetCode] 988. Smallest String Starting From Leaf
原题链接:https://leetcode.com/problems/smallest-string-starting-from-leaf/原创 2019-06-25 23:46:44 · 245 阅读 · 0 评论 -
[LeetCode] 987. Vertical Order Traversal of a Binary Tree
原题链接:https://leetcode.com/problems/vertical-order-traversal-of-a-binary-tree/1. 题目介绍Given a binary tree, return the vertical order traversal of its nodes values.For each node at position (X, Y), it...原创 2019-06-15 02:55:40 · 233 阅读 · 0 评论 -
[LeetCode] 938. Range Sum of BST
原题链接: https://leetcode.com/problems/range-sum-of-bst/1. 题目介绍Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (inclusive).The binary sear...原创 2019-06-03 20:53:59 · 151 阅读 · 0 评论 -
[LeetCode] 100. Same Tree
原题链接:https://leetcode.com/problems/same-tree/1. 题目介绍Given two binary trees, write a function to check if they are the same or not.Two binary trees are considered the same if they are structurally i...原创 2019-06-03 02:24:28 · 154 阅读 · 0 评论 -
[LeetCode] 700. Search in a Binary Search Tree
原题链接: https://leetcode.com/problems/search-in-a-binary-search-tree/1. 题目介绍Given the root node of a binary search tree (BST) and a value. You need to find the node in the BST that the node’s value eq...原创 2019-05-24 23:31:30 · 177 阅读 · 0 评论 -
[LeetCode] 559. Maximum Depth of N-ary Tree
原题链接:https://leetcode.com/problems/maximum-depth-of-n-ary-tree/1. 题目介绍Given a n-ary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node d...原创 2019-05-16 11:45:01 · 197 阅读 · 0 评论 -
[LeetCode] 110. Balanced Binary Tree
原题链接:https://leetcode.com/problems/balanced-binary-tree/1. 题目介绍Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as:a binary tree i...原创 2019-05-16 02:02:22 · 130 阅读 · 0 评论 -
[LeetCode] 404. Sum of Left Leaves
原题链接:https://leetcode.com/problems/sum-of-left-leaves/1. 题目介绍Find the sum of all left leaves in a given binary tree.给出一个二叉树,计算所有左叶子节点的val值之和。Example:There are two left leaves in the binary tree,...原创 2019-05-21 01:24:52 · 141 阅读 · 0 评论 -
[LeetCode] 95. Unique Binary Search Trees II
原题链接:https://leetcode.com/problems/unique-binary-search-trees-ii/1. 题目介绍Given an integer n, generate all structurally unique BST’s (binary search trees) that store values 1 … n.给出一个整数n,返回从1到n的所有数形成...原创 2019-05-19 17:29:31 · 182 阅读 · 0 评论 -
[LeetCode] 96. Unique Binary Search Trees
原题链接: https://leetcode.com/problems/unique-binary-search-trees/1. 题目介绍Given n, how many structurally unique BST’s (binary search trees) that store values 1 … n?给出一个数n,求从1到n的所有数可以形成多少种不一样的二叉树?Examp...原创 2019-03-03 13:32:35 · 169 阅读 · 0 评论 -
[LeetCode] 102. Binary Tree Level Order Traversal
原题链接:https://leetcode.com/problems/binary-tree-level-order-traversal/1. 题目介绍Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).给出一个...原创 2019-05-19 14:31:44 · 176 阅读 · 0 评论 -
[LeetCode] 104. Maximum Depth of Binary Tree
原题链接:https://leetcode.com/problems/maximum-depth-of-binary-tree/Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to...原创 2019-05-13 23:45:59 · 125 阅读 · 0 评论 -
[LeetCode] 111. Minimum Depth of Binary Tree
原题链接: https://leetcode.com/problems/minimum-depth-of-binary-tree/1. 题目介绍Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root no...原创 2019-05-14 11:42:09 · 111 阅读 · 0 评论 -
[LeetCode] 669. Trim a Binary Search Tree
原题链接: https://leetcode.com/problems/trim-a-binary-search-tree/1. 题目介绍Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R...原创 2019-05-24 00:53:21 · 154 阅读 · 0 评论 -
[LeetCode] 144. Binary Tree Preorder Traversal
原题链接:https://leetcode.com/problems/binary-tree-preorder-traversal/1. 题目介绍Given a binary tree, return the preorder traversal of its nodes’ values.给出一个二叉树,返回它的前序遍历顺序。前序遍历是指,首先访问根结点,然后遍历左子树,最后遍历右子树。...原创 2019-05-29 00:37:02 · 231 阅读 · 0 评论 -
[LeetCode] 637. Average of Levels in Binary Tree
原题链接: https://leetcode.com/problems/average-of-levels-in-binary-tree/1. 题目介绍Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array.给出一个非空的二叉树,返回每...原创 2019-06-02 21:30:48 · 181 阅读 · 0 评论 -
[LeetCode] 429. N-ary Tree Level Order Traversal
原题链接:https://leetcode.com/problems/n-ary-tree-level-order-traversal/1. 题目介绍2. 解题思路可以参考二叉树的广度优先搜索https://blog.csdn.net/Bertram03/article/details/90319770实现代码/*// Definition for a Node.class Nod...原创 2019-06-02 17:45:41 · 247 阅读 · 0 评论 -
[LeetCode] 590. N-ary Tree Postorder Traversal
原题链接: https://leetcode.com/problems/n-ary-tree-postorder-traversal/1. 题目介绍Given an n-ary tree, return the postorder traversal of its nodes’ values.给出一个n叉树,返回后序遍历的结果。后序遍历就是指先从左到右遍历完所有的子树,然后再遍历根节点。...原创 2019-05-30 00:28:28 · 171 阅读 · 0 评论 -
[LeetCode] 589. N-ary Tree Preorder Traversal
原题链接:https://leetcode.com/problems/n-ary-tree-preorder-traversal/1. 题目介绍Given an n-ary tree, return the preorder traversal of its nodes’ values.For example, given a 3-ary tree:Return its preorder...原创 2019-05-29 23:40:50 · 214 阅读 · 0 评论 -
[LeetCode] 94. Binary Tree Inorder Traversal
原题链接: https://leetcode.com/problems/binary-tree-inorder-traversal/1. 题目介绍Given a binary tree, return the inorder traversal of its nodes’ values.给定一个二叉树,返回对这个树进行中序遍历的结果。Example:Follow up: Recursi...原创 2019-05-29 23:18:27 · 127 阅读 · 0 评论