摘要: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For ... 阅读全文
posted @ 2015-08-12 16:13 尾巴草 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tree {3... 阅读全文
posted @ 2015-08-12 14:58 尾巴草 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the postorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [3,2,... 阅读全文
posted @ 2015-08-12 11:37 尾巴草 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,3,2]... 阅读全文
posted @ 2015-08-12 11:32 尾巴草 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the preorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,2,3... 阅读全文
posted @ 2015-08-12 11:12 尾巴草 阅读(218) 评论(0) 推荐(0) 编辑
摘要: Implement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes the element from in front o... 阅读全文
posted @ 2015-08-12 10:48 尾巴草 阅读(128) 评论(0) 推荐(0) 编辑