binary tree
leetcode
qq184861643
这个作者很懒,什么都没留下…
展开
-
leetcode:Balanced Binary Tree
Problem Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which the depth of the two subtrees of every node ne...原创 2018-04-03 11:17:12 · 102 阅读 · 0 评论 -
leetcode:Smallest Subtree with all the Deepest Nodes
Problem Given a binary tree rooted at root, the depth of each node is the shortest distance to the root. A node is deepest if it has the largest depth possible among any node in the entire tree. Th...原创 2018-07-21 00:22:28 · 229 阅读 · 0 评论 -
leetcode: 二叉树的三种非递归遍历
class TreeNode: def __init__(self,val): super(TreeNode).__init__() self.val = val self.left = None self.right = None self.isPop = False def createTree(valL...原创 2018-10-18 22:37:18 · 367 阅读 · 0 评论