
Desicription
Given a binary tree, return the preorder traversal of its nodes’ values.
Example:
1 |
Input: [1,null,2,3] |
Follow up: Recursive solution is trivial, could you do it iteratively?
Solution
1 |
|

Given a binary tree, return the preorder traversal of its nodes’ values.
Example:
1 |
Input: [1,null,2,3] |
Follow up: Recursive solution is trivial, could you do it iteratively?
1 |
|
近期评论