摘要:
Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is 阅读全文
posted @ 2017-06-18 23:24
鸭子船长
阅读(229)
评论(0)
推荐(0)
摘要:
Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical a 阅读全文
posted @ 2017-06-18 22:52
鸭子船长
阅读(228)
评论(0)
推荐(0)
摘要:
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: But the fol 阅读全文
posted @ 2017-06-18 22:47
鸭子船长
阅读(180)
评论(0)
推荐(0)
摘要:
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and 阅读全文
posted @ 2017-06-18 22:35
鸭子船长
阅读(452)
评论(0)
推荐(0)
摘要:
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 the farthest l 阅读全文
posted @ 2017-06-18 22:21
鸭子船长
阅读(254)
评论(0)
推荐(0)
摘要:
Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. 阅读全文
posted @ 2017-06-18 22:17
鸭子船长
阅读(186)
评论(0)
推荐(0)

浙公网安备 33010602011771号