摘要:
Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].Note:Recursive solution is trivial, could you do it iteratively?Code:1. Recursive:class Solution {public: void findNode(vector &nodes,TreeNode *node){... 阅读全文
posted @ 2013-11-07 08:24
WinsCoder
阅读(123)
评论(0)
推荐(0)

浙公网安备 33010602011771号