标签:des style blog color java strong io for
题目:
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 solution is trivial, could you do it iteratively?
题解:
递归做法如下:
非递归方法:
Binary Tree Preorder Traversal leetcode java,布布扣,bubuko.com
Binary Tree Preorder Traversal leetcode java
标签:des style blog color java strong io for
原文地址:http://www.cnblogs.com/springfor/p/3877182.html