2015年5月14日

摘要: 题目: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 @ 2015-05-14 22:34 承续缘 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then right to left for the next level and... 阅读全文
posted @ 2015-05-14 11:17 承续缘 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For ... 阅读全文
posted @ 2015-05-14 10:18 承续缘 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,... 阅读全文
posted @ 2015-05-14 09:59 承续缘 阅读(212) 评论(0) 推荐(0) 编辑

导航