LeetCode
adjadv2012
这个作者很懒,什么都没留下…
展开
-
LeetCode OJ: Binary Tree Postorder Traversal
转战LeetCode,开始不适应,只好先从简单的题目开始 Given a binary tree, return the postorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3 return原创 2014-03-20 10:47:53 · 369 阅读 · 0 评论 -
LeetCode: Binary Tree Preorder Traversal
Given a binary tree, return the preorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [1,2,3]. Note: Recursive solu原创 2014-03-20 13:56:51 · 322 阅读 · 0 评论 -
LeetCode: Binary Tree Level Order Traversal II
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 example: Given binary tree {3,9,20,#,#,15,7},原创 2014-03-20 12:06:25 · 464 阅读 · 0 评论