2016年5月24日

摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: But the fol 阅读全文
posted @ 2016-05-24 19:44 烁宝宝 阅读(178) 评论(0) 推荐(0)
 
摘要: Given a binary tree Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL 阅读全文
posted @ 2016-05-24 19:26 烁宝宝 阅读(241) 评论(0) 推荐(0)
 
摘要: Given a binary tree, flatten it to a linked list in-place. For example,Given The flattened tree should look like: 阅读全文
posted @ 2016-05-24 16:31 烁宝宝 阅读(214) 评论(0) 推荐(0)
 
摘要: Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [1,3,2]. 代码如下: 阅读全文
posted @ 2016-05-24 16:03 烁宝宝 阅读(113) 评论(0) 推荐(0)
 
摘要: Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. For exa 阅读全文
posted @ 2016-05-24 15:55 烁宝宝 阅读(217) 评论(0) 推荐(0)