Problem
Given a binary tree, return the preorder, in order and postorder traversal of its nodes' values.Note: Recursive solution is trivial, could you do it iteratively ?
Algorithm
Recursive solution is easy.
Iterative solution can be treated in a same format.
No comments:
Post a Comment