Is the order (left then right) or (right then left)?


  • 0
    B

    Which kind of order is required?

    Traverse the left subtree.
    Traverse the right subtree.
    Visit the root.

    --or--

    Traverse the right subtree.
    Traverse the left subtree.
    Visit the root.

    because it seems to me it's requiring the latter, while the former is the conventional way to do post-order traversal.


  • 1
    S

    Post order traversal means left, right, root. Here is the reference from wiki.


  • 0
    K
    This post is deleted!

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.