Added: 11 months ago
From: Agilowen
Views: 1,990
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (4)

Sign In or Sign Up now to post a comment!
  • In preorder traversal using stack, if we push right node first and then push left node, while popping those nodes, left will come first and then right node, same as in the case of recursion. Can we do it in this way?

  • @Agilowen : Thanks.

    Actually, at most of the places on web, I found it the way I asked. If the method/sequence described by you is used, it is referred to as "Reverse Pre-order".

    Your videos are really good for understanding tree traversals. Thanks a lot!

  • thanks, it helped alot for my exam

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more