摘要:
Given a binary tree, return the postorder traversal of its nodes' values.For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3return [3,2,1].Note: Recursive solution is trivial, could you do it iteratively?思考:原思路是为每个节点增加一个标记。这个思路先序遍历不要标记,因为当前访问结点直接出栈,不用看是否访问过。不过此思路redefinition of 'struct... 阅读全文