随笔分类 -  Tree

摘要:116. Populating Next Right Pointers in Each Node Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next 阅读全文
posted @ 2016-07-12 13:32 新一代的天皇巨星 阅读(189) 评论(0) 推荐(0)
摘要:  Subscribe to see which companies asked this question     阅读全文
posted @ 2016-03-14 08:16 新一代的天皇巨星 阅读(132) 评论(0) 推荐(0)
摘要:For example, this binary tree is symmetric:   But the following is not:   Note:Bonus points if you could solve it both recursively and iteratively. co 阅读全文
posted @ 2016-03-14 07:56 新一代的天皇巨星 阅读(129) 评论(0) 推荐(0)
摘要:Note:You may assume that duplicates do not exist in the tree.   Subscribe to see which companies asked this question   阅读全文
posted @ 2016-03-14 05:41 新一代的天皇巨星 阅读(159) 评论(0) 推荐(0)
摘要:Note:You may assume that duplicates do not exist in the tree.   Subscribe to see which companies asked this question       阅读全文
posted @ 2016-03-14 05:02 新一代的天皇巨星 阅读(214) 评论(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 dept 阅读全文
posted @ 2016-03-12 14:29 新一代的天皇巨星 阅读(175) 评论(0) 推荐(0)
摘要:102. Binary Tree Level Order Traversal Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by l 阅读全文
posted @ 2016-03-01 01:22 新一代的天皇巨星 阅读(187) 评论(0) 推荐(0)
摘要:public List<Integer> inorderTraversal(TreeNode root) { Deque<TreeNode> nodes = new ArrayDeque<TreeNode>(); List<Integer> visits = new LinkedList<Integ 阅读全文
posted @ 2015-09-25 12:08 新一代的天皇巨星 阅读(168) 评论(0) 推荐(0)
摘要:  阅读全文
posted @ 2015-09-21 03:20 新一代的天皇巨星 阅读(123) 评论(0) 推荐(0)
摘要:  阅读全文
posted @ 2015-09-21 02:45 新一代的天皇巨星 阅读(151) 评论(0) 推荐(0)