摘要: 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 al... 阅读全文
posted @ 2015-06-22 10:08 朱传林 阅读(127) 评论(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 exa... 阅读全文
posted @ 2015-06-22 09:09 朱传林 阅读(120) 评论(0) 推荐(0)
摘要: Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exampl... 阅读全文
posted @ 2015-06-22 09:00 朱传林 阅读(107) 评论(0) 推荐(0)
摘要: 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... 阅读全文
posted @ 2015-06-22 08:52 朱传林 阅读(141) 评论(0) 推荐(0)
摘要: Given acompletebinary tree, count the number of nodes.Definition of a complete binary tree fromWikipedia:In a complete binary tree every level, except... 阅读全文
posted @ 2015-06-22 08:32 朱传林 阅读(150) 评论(0) 推荐(0)
摘要: Given preorder and inorder (Inorder and Postorder) traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in ... 阅读全文
posted @ 2015-06-22 08:26 朱传林 阅读(164) 评论(0) 推荐(0)