Hard-题目4：145. Binary Tree Postorder Traversal

Given a binary tree, return the postorder traversal of its nodes’ values.

For example:
Given binary tree {1,#,2,3},

   1
\
2
/
3

return [3,2,1].

/**
* Definition for a binary tree node.
* public class TreeNode {
*     int val;
*     TreeNode left;
*     TreeNode right;
*     TreeNode(int x) { val = x; }
* }
*/
public class Solution {
public List<Integer> postorderTraversal(TreeNode root) {
List<Integer> result = new ArrayList<Integer>();
traverse(root,result);
return result;
}
public void traverse(TreeNode node,List<Integer> list) {
if(node!=null) {

traverse(node.left,list);
traverse(node.right,list);
}
return;
}
}

1ms，beats 70.01%，众数2ms,62.51%
Cmershen的碎碎念：

LeetCode(145)Binary Tree Postorder Traversal

2014-01-16 04:01:50

【LeetCode】145. Binary Tree Postorder Traversal 解题报告

2016-05-25 00:48:57

Binary Tree Postorder Traversal -- LeetCode

2014-03-25 01:10:09

LeetCode145 Binary Tree Postorder Traversal Java题解（递归 迭代）

2015-07-09 10:34:20

[leetcode-145]Binary Tree Postorder Traversal(c++)

2015-08-20 09:53:29

LeetCode 145：Binary Tree Postorder Traversal（后序遍历）

2015-05-23 01:38:46

二叉树遍历145. Binary Tree Postorder Traversal

2016-11-04 18:34:48

Leetcode 145. Binary Tree Postorder Traversal

2016-02-27 09:31:03

145. Binary Tree Postorder Traversal非递归，栈实现

2016-05-11 10:53:34

【LeetCode-145】Binary Tree Postorder Traversal(C++)

2016-09-17 17:20:04

不良信息举报

Hard-题目4：145. Binary Tree Postorder Traversal