2016年7月11日

Invert Binary Tree

摘要: Invert a binary tree. to 反转二叉树,其实就是自顶向下递归翻转.代码如下: 阅读全文

posted @ 2016-07-11 18:14 Sheryl Wang 阅读(106) 评论(0) 推荐(0) 编辑

Recover Binary Search Tree

摘要: 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 阅读全文

posted @ 2016-07-11 17:12 Sheryl Wang 阅读(129) 评论(0) 推荐(0) 编辑

Inorder Successor in BST

摘要: Given a binary search tree and a node in it, find the in-order successor of that node in the BST. Note: If the given node has no in-order successor in 阅读全文

posted @ 2016-07-11 15:22 Sheryl Wang 阅读(392) 评论(0) 推荐(0) 编辑

Binary Tree Inorder Traversal

摘要: 基础功底,此类模板以后一次总结: 阅读全文

posted @ 2016-07-11 09:52 Sheryl Wang 阅读(108) 评论(0) 推荐(0) 编辑

导航