LeetCode_145Binary Tree Postorder Traversal
来源:互联网 发布:https域名劫持原理 编辑:程序博客网 时间:2024/06/07 10:39
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].
private void resPreorder(TreeNode root){ if(root == null) return; resPreorder(root.left); resPreorder(root.right); result.add(root.val); } List<Integer> result = new ArrayList<Integer>(); public List<Integer> postorderTraversal(TreeNode root) { resPreorder(root); return result; }
0 0
- LeetCode_145Binary Tree Postorder Traversal
- Binary Tree Postorder Traversal
- Binary Tree Postorder Traversal
- Binary Tree Postorder Traversal
- Binary Tree Postorder Traversal
- Binary Tree Postorder Traversal
- Binary Tree Postorder Traversal
- Binary Tree Postorder Traversal
- Binary Tree Postorder Traversal
- Binary Tree Postorder Traversal
- Binary Tree Postorder Traversal
- Binary Tree Postorder Traversal
- Binary Tree Postorder Traversal
- Binary Tree Postorder Traversal
- Binary Tree Postorder Traversal
- Binary Tree Postorder Traversal
- Binary Tree Postorder Traversal
- Leetcode_binary-tree-postorder-traversal
- Nginx学习之十一-Nginx启动框架处理流程
- 整合:求最短路算法 floyd prim dijkstra Kruskal spfa算法简析
- JTable合并表头
- [BZOJ1031][JSOI2007]字符加密Cipher
- Jquery常用的的选择器及容易忽视的小错误
- LeetCode_145Binary Tree Postorder Traversal
- Scala访问权限修饰符:private和private[this]
- Oracle TYPE OBJECT详解
- 严重: Skipped installing application listeners due to previous error(s)
- hdu 5335 Walk Out (2015 Multi-University Training Contest 4)
- c point
- Redis同步操作失败的原因
- Redis数据类型之字符串
- 一个简单的Android图片处理Demo