![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Tree
郝春雨
大数据开发萌新,吉他入门小渣渣,吃货并一直努力地减肥着,永远怀着一颗成为大神的心,希望在智能的这几年不虚度~~~
展开
-
【LeetCode】250.Count Univalue Subtrees(Medium)解题报告
【LeetCode】250.Count Univalue Subtrees(Medium)解题报告题目地址:https://leetcode.com/problems/count-univalue-subtrees/题目描述: Given a binary tree, count the number of uni-value subtrees. A Uni-value sub原创 2018-05-04 11:27:41 · 465 阅读 · 0 评论 -
【LeetCode】117.Populating Next Right Pointers in Each Node II(Medium)解题报告
【LeetCode】117.Populating Next Right Pointers in Each Node II(Medium)解题报告题目地址:https://leetcode.com/problems/unique-binary-search-trees/description/ 题目描述: Follow up for problem “Populating Next Righ原创 2018-04-03 21:09:59 · 286 阅读 · 0 评论 -
【LeetCode】129.Sum Root to Leaf Numbers(Medium)解题报告
【LeetCode】129.Sum Root to Leaf Numbers(Medium)解题报告题目地址:https://leetcode.com/problems/sum-root-to-leaf-numbers/description/ 题目描述: Given a binary tree containing digits from 0-9 only, each root-to-l原创 2018-04-08 23:03:25 · 164 阅读 · 0 评论 -
【LeetCode】563.Binary Tree Tilt(Easy)解题报告
【LeetCode】563.Binary Tree Tilt(Easy)解题报告题目地址:https://leetcode.com/problems/binary-tree-tilt/description/ 题目描述: Given a binary tree, flatten it to a linked list in-place.Given a binary tree, return原创 2018-04-08 22:49:35 · 228 阅读 · 0 评论 -
【LeetCode】113.Path Sum II(Medium)解题报告
【LeetCode】113.Path Sum II(Medium)解题报告题目地址:https://leetcode.com/problems/path-sum-ii/description/ 题目描述: Given a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals the g原创 2018-03-14 16:26:08 · 121 阅读 · 0 评论 -
【LeetCode】116.Populating Next Right Pointers in Each Node(Medium)解题报告
【LeetCode】116.Populating Next Right Pointers in Each Node(Medium)解题报告题目地址:https://leetcode.com/problems/populating-next-right-pointers-in-each-node/description/ 题目描述:Given a binary tree st...原创 2018-03-30 08:54:19 · 122 阅读 · 0 评论 -
【LeetCode】285.Inorder Successor in BST(Medium)(带锁题)解题报告
【LeetCode】285.Inorder Successor in BST(Medium)(带锁题)解题报告题目地址:https://leetcode.com/problems/inorder-successor-in-bst/ 题目描述: Given a binary search tree and a node in it, find the in-order successor o原创 2018-03-19 13:13:14 · 284 阅读 · 0 评论 -
【LeetCode】297.Serialize and Deserialize Binary Tree(Hard)解题报告
【LeetCode】297.Serialize and Deserialize Binary Tree(Hard)解题报告题目地址:https://leetcode.com/problems/serialize-and-deserialize-binary-tree/description/ 题目描述: Serialization is the process of converting原创 2018-03-22 23:01:46 · 171 阅读 · 0 评论 -
【LeetCode】653.Two Sum IV - Input is a BST(Easy)解题报告
【LeetCode】653.Two Sum IV - Input is a BST(Easy)解题报告题目地址:https://leetcode.com/problems/two-sum-iv-input-is-a-bst/description/ 题目描述: Given a Binary Search Tree and a target number, return true if th原创 2018-03-22 22:12:27 · 153 阅读 · 0 评论 -
【LeetCode】112.Path Sum(Easy)解题报告
【LeetCode】112.Path Sum(Easy)解题报告题目地址:https://leetcode.com/problems/path-sum/description/ 题目描述: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up...原创 2018-03-12 22:44:15 · 108 阅读 · 0 评论 -
【LeetCode】270.Closest Binary Search Tree Value(Easy)解题报告
【LeetCode】270.Closest Binary Search Tree Value(Easy)解题报告题目地址:http://leetcode.com/problems/closest-binary-search-tree-value/ 题目描述: Given a non-empty binary search tree and a target value, find the原创 2018-04-03 21:45:48 · 638 阅读 · 0 评论 -
【LeetCode】449.Serialize and Deserialize BST(Medium)解题报告
【LeetCode】449.Serialize and Deserialize BST(Medium)解题报告题目地址:https://leetcode.com/problems/serialize-and-deserialize-bst/description/ 题目描述: Serialization is the process of converting a data structu原创 2018-03-29 13:44:44 · 276 阅读 · 0 评论 -
【LeetCode】96.Unique Binary Search Trees(Medium)解题报告
【LeetCode】96.Unique Binary Search Trees(Medium)解题报告题目地址:https://leetcode.com/problems/unique-binary-search-trees/description/ 题目描述: Given n, how many structurally unique BST’s (binary search trees原创 2018-03-29 13:48:11 · 140 阅读 · 0 评论 -
【LeetCode】124.Binary Tree Maximum Path Sum(Hard)解题报告
【LeetCode】124.Binary Tree Maximum Path Sum(Hard)解题报告题目地址:https://leetcode.com/problems/binary-tree-maximum-path-sum/description/ 题目描述: Given a non-empty binary tree, find the maximum path sum.原创 2018-05-04 10:56:48 · 351 阅读 · 0 评论 -
【LeetCode】106.Construct Binary Tree from Inorder and Postorder Traversal(Medium)解题报告
【LeetCode】106.Construct Binary Tree from Inorder and Postorder Traversal(Medium)解题报告题目地址:https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/description/ 题目描述:原创 2018-05-01 23:00:33 · 398 阅读 · 0 评论 -
【LeetCode】105.Construct Binary Tree from Preorder and Inorder Traversal(Medium)解题报告
【LeetCode】105.Construct Binary Tree from Preorder and Inorder Traversal(Medium)解题报告题目地址:https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/description/ 题目描述: G原创 2018-05-01 22:58:01 · 258 阅读 · 0 评论 -
【LeetCode】114.Flatten Binary Tree to Linked List(Medium)解题报告
【LeetCode】114.Flatten Binary Tree to Linked List(Medium)解题报告题目地址:https://leetcode.com/problems/flatten-binary-tree-to-linked-list/description/ 题目描述: Given a binary tree, flatten it to a linked lis原创 2018-04-07 10:01:55 · 148 阅读 · 0 评论 -
【LeetCode】109.Convert Sorted List to Binary Search Tree(Medium)解题报告
【LeetCode】109.Convert Sorted List to Binary Search Tree(Medium)解题报告题目地址:https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/description/ 题目描述: Given a singly linked list where原创 2018-03-29 14:05:26 · 300 阅读 · 0 评论 -
【LeetCode】337.House Robber III(Medium)解题报告
【LeetCode】337.House Robber III(Medium)解题报告题目地址:https://leetcode.com/problems/house-robber-iii/description/ 题目描述: The thief has found himself a new place for his thievery again. There is only one e原创 2018-03-29 14:00:51 · 210 阅读 · 0 评论 -
【LeetCode】108.Convert Sorted Array to Binary Search Tree(Easy)解题报告
【LeetCode】108.Convert Sorted Array to Binary Search Tree(Easy)解题报告题目地址:https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/description/ 题目描述: Given an array where elements are原创 2018-03-29 13:56:42 · 119 阅读 · 0 评论 -
【LeetCode】173.Binary Search Tree Iterator(Medium)解题报告
【LeetCode】173.Binary Search Tree Iterator(Medium)解题报告题目地址:https://leetcode.com/problems/binary-search-tree-iterator/description/ 题目描述: Implement an iterator over a binary search tree (BST). Your i原创 2018-03-29 13:54:55 · 136 阅读 · 0 评论 -
【LeetCode】95.Unique Binary Search Trees II(Medium)解题报告
【LeetCode】95.Unique Binary Search Trees II(Medium)解题报告题目地址:https://leetcode.com/problems/unique-binary-search-trees-ii/description/ 题目描述: Given an integer n, generate all structurally unique BST’s原创 2018-03-29 13:52:35 · 239 阅读 · 0 评论 -
【LeetCode】145.Binary Tree Postorder Traversal(Hard)解题报告
【LeetCode】145.Binary Tree Postorder Traversal(Hard)解题报告题目地址:https://leetcode.com/problems/binary-tree-postorder-traversal/description/ 题目描述: Given a binary tree, return the postorder traversa...原创 2017-12-12 08:59:12 · 190 阅读 · 0 评论 -
【LeetCode】404.Sum of Left Leaves(Easy)解题报告
【LeetCode】404.Sum of Left Leaves(Easy)解题报告题目地址:https://leetcode.com/problems/sum-of-left-leaves/description/ 题目描述: Find the sum of all left leaves in a given binary tree.Example: 3 / \ 9原创 2018-03-19 09:04:15 · 222 阅读 · 0 评论 -
【LeetCode】513.Find Bottom Left Tree Value(Medium)解题报告
【LeetCode】513.Find Bottom Left Tree Value(Medium)解题报告题目地址:https://leetcode.com/problems/find-bottom-left-tree-value/description/ 题目描述: Given a binary tree, find the leftmost value in the last row原创 2018-03-19 08:41:38 · 137 阅读 · 0 评论 -
【LeetCode】144. Binary Tree Preorder Traversal(Medium)解题报告
【LeetCode】144. Binary Tree Preorder Traversal(Medium)解题报告题目地址:https://leetcode.com/problems/binary-tree-preorder-traversal/description/ 题目描述: Given a binary tree, return the preorder traversal of原创 2018-03-11 10:32:13 · 99 阅读 · 0 评论 -
【LeetCode】257.Binary Tree Paths(Easy)解题报告
【LeetCode】257.Binary Tree Paths(Easy)解题报告题目地址:https://leetcode.com/problems/binary-tree-paths/description/ 题目描述: Given a binary tree, return all root-to-leaf paths. For example, given the f原创 2018-03-11 10:27:33 · 176 阅读 · 0 评论 -
【LeetCode】98. Validate Binary Search Tree(Medium)解题报告
【LeetCode】98. Validate Binary Search Tree(Medium)解题报告题目地址:https://leetcode.com/problems/validate-binary-search-tree/description/ 题目描述: Given a binary tree, determine if it is a valid binary search原创 2018-03-11 10:24:23 · 139 阅读 · 0 评论 -
【LeetCode】104.Maximum Depth of Binary Tree(Easy)解题报告
【LeetCode】104.Maximum Depth of Binary Tree(Easy)解题报告题目地址:https://leetcode.com/problems/maximum-depth-of-binary-tree/description/ 题目描述: Given a binary tree, find its maximum depth. The maxim原创 2018-03-11 10:19:54 · 113 阅读 · 0 评论 -
【LeetCode】111.Minimum Depth of Binary Tree(Easy)解题报告
【LeetCode】111.Minimum Depth of Binary Tree(Easy)解题报告题目地址:https://leetcode.com/problems/minimum-depth-of-binary-tree/description/ 题目描述: Given a binary tree, find its minimum depth. The minim原创 2018-03-11 10:14:02 · 114 阅读 · 0 评论 -
【LeetCode】230.Kth Smallest Element in a BST(Medium)解题报告
【LeetCode】230.Kth Smallest Element in a BST(Medium)解题报告题目地址:https://leetcode.com/problems/kth-smallest-element-in-a-bst/description/ 题目描述: Given a binary search tree, write a function kthSmallest原创 2018-03-11 10:11:09 · 167 阅读 · 0 评论 -
【LeetCode】236.Lowest Common Ancestor of a Binary Tree(Medium)解题报告
【LeetCode】236.Lowest Common Ancestor of a Binary Tree(Medium)解题报告题目地址:https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/description/ 题目描述: Given a binary tree, find the lo...原创 2018-03-11 10:10:26 · 158 阅读 · 0 评论 -
【LeetCode】235.Lowest Common Ancestor of a Binary Search Tree(Easy)解题报告
【LeetCode】235.Lowest Common Ancestor of a Binary Search Tree(Easy)解题报告题目地址: https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/description/ 题目描述: Given a binary search tr原创 2018-03-11 10:09:22 · 105 阅读 · 0 评论 -
【LeetCode】103. Binary Tree Zigzag Level Order Traversal(Medium)解题报告
【LeetCode】103. Binary Tree Zigzag Level Order Traversal(Medium)解题报告题目地址:https://leetcode.com/problems/binary-tree-level-order-traversal/description/ 题目描述: Given a binary tree, return the zigzag le原创 2018-03-14 18:28:50 · 123 阅读 · 0 评论 -
【LeetCode】107.Binary Tree Level Order Traversal II(Easy)解题报告
【LeetCode】107.Binary Tree Level Order Traversal II(Easy)解题报告题目地址:https://leetcode.com/problems/binary-tree-level-order-traversal-ii/description/ 题目描述: Given a binary tree, return the bottom-up lev原创 2018-03-17 09:51:30 · 105 阅读 · 0 评论 -
【LeetCode】94.Binary Tree Inorder Traversal(Medium)解题报告
【LeetCode】94.Binary Tree Inorder Traversal(Medium)解题报告题目地址:https://leetcode.com/problems/binary-tree-level-order-traversal-ii/description/ 题目描述: Given a binary tree, return the inorder traversal o原创 2018-03-17 09:54:50 · 155 阅读 · 0 评论 -
【LeetCode】100.Same Tree(Easy)解题报告
【LeetCode】100.Same Tree(Easy)解题报告题目地址:https://leetcode.com/problems/same-tree/description/ 题目描述: Given two binary trees, write a function to check if they are the same or not. Two binary...原创 2017-12-10 23:36:29 · 137 阅读 · 0 评论 -
【LeetCode】298.Binary Tree Longest Consecutive Sequence(Medium)(加锁题)解题报告
【LeetCode】298.Binary Tree Longest Consecutive Sequence(Medium)(加锁题)解题报告题目地址:https://leetcode.com/problems/binary-tree-longest-consecutive-sequence/ 题目描述: Given a binary tree, find the length of th原创 2018-03-18 09:22:46 · 261 阅读 · 0 评论 -
【LeetCode】156.Binary Tree Upside Down(Medium)(加锁题)解题报告
【LeetCode】156.Binary Tree Upside Down(Medium)(加锁题)解题报告题目地址:https://leetcode.com/problems/binary-tree-upside-down/ 题目描述: Given a binary tree where all the right nodes are either leaf nodes with a s原创 2018-03-17 22:46:48 · 249 阅读 · 0 评论 -
【LeetCode】637.Average of Levels in Binary Tree(Easy)解题报告
【LeetCode】637.Average of Levels in Binary Tree(Easy)解题报告题目地址:https://leetcode.com/problems/average-of-levels-in-binary-tree/description/ 题目描述: Given a non-empty binary tree, return the average val原创 2018-03-17 20:29:32 · 171 阅读 · 0 评论