- 博客(188)
- 收藏
- 关注
原创 【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 520
原创 【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 401
原创 【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 447
原创 【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 276
原创 【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 182
原创 【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 262
原创 【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 161
原创 【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 673
原创 【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 332
原创 【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 138
原创 【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 334
原创 【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 227
原创 【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 134
原创 【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 151
原创 【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 254
原创 【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 155
原创 【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 292
原创 【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 188
原创 【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 169
原创 【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 296
原创 【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 233
原创 【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 153
原创 【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 311
原创 【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 266
原创 【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 188
原创 【LeetCode】617.Merge Two Binary Trees(Easy)解题报告
【LeetCode】617.Merge Two Binary Trees(Easy)解题报告题目地址:https://leetcode.com/problems/merge-two-binary-trees/description/ 题目描述: Given two binary trees and imagine that when you put one of them to cover
2018-03-17 20:18:43 275
原创 【LeetCode】110. Balanced Binary Tree(Easy)解题报告
【LeetCode】110. Balanced Binary Tree(Easy)解题报告题目地址:https://leetcode.com/problems/balanced-binary-tree/description/ 题目描述: Given a binary tree, determine if it is height-balanced. For this pro
2018-03-17 20:07:24 192
原创 【LeetCode】199.Binary Tree Right Side View(Medium)解题报告
【LeetCode】199.Binary Tree Right Side View(Medium)解题报告题目地址:https://leetcode.com/problems/binary-tree-right-side-view/description/ 题目描述: Given a binary tree, imagine yourself standing on the right s
2018-03-17 19:51:40 144
原创 【LeetCode】199.Binary Tree Right Side View(Medium)解题报告
【LeetCode】199.Binary Tree Right Side View(Medium)解题报告题目地址:https://leetcode.com/problems/binary-tree-right-side-view/description/ 题目描述: Given a binary tree, imagine yourself standing on the right s
2018-03-17 19:51:14 130
原创 【LeetCode】226.Invert Binary Tree(Easy)解题报告
【LeetCode】226.Invert Binary Tree(Easy)解题报告题目地址:https://leetcode.com/problems/invert-binary-tree/description/ 题目描述:Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 /
2018-03-17 10:03:27 171
原创 LeetCode】101.Symmetric Tree(Easy)解题报告
【LeetCode】101.Symmetric Tree(Easy)解题报告题目地址:https://leetcode.com/problems/symmetric-tree/description/ 题目描述: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its cen
2018-03-17 10:00:11 137
原创 【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 174
原创 【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 117
原创 【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 137
原创 【LeetCode】102.Binary Tree Level Order Traversal(Medium)解题报告
【LeetCode】102.Binary Tree Level Order Traversal(Medium)解题报告题目地址:https://leetcode.com/problems/binary-tree-level-order-traversal/description/ 题目描述: Given a binary tree, return the level order trave
2018-03-14 18:00:50 112
原创 【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 133
原创 【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 120
原创 【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 115
原创 【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 196
原创 【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 150
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人