摘要: 1.题目描述 Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its s... 阅读全文
posted @ 2013-08-15 23:51 曾见绝美的阳光 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 1.题目描述 Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follo... 阅读全文
posted @ 2013-08-15 22:16 曾见绝美的阳光 阅读(238) 评论(1) 推荐(0) 编辑
摘要: 1.题目描述 Given two binary trees, write a function to check if they are equal or not. Two binary trees are considere... 阅读全文
posted @ 2013-08-15 21:41 曾见绝美的阳光 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 1.题目描述 Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example... 阅读全文
posted @ 2013-08-15 20:59 曾见绝美的阳光 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 1.题目描述 Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may ass... 阅读全文
posted @ 2013-08-15 01:02 曾见绝美的阳光 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 1.题目描述 Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from lea... 阅读全文
posted @ 2013-08-15 00:30 曾见绝美的阳光 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 1.题目描述 Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 2.解法分析 ... 阅读全文
posted @ 2013-08-15 00:02 曾见绝美的阳光 阅读(211) 评论(0) 推荐(0) 编辑