Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7963579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:38:22+00:00 2026-06-04T05:38:22+00:00

Possible Duplicate: Post order traversal of binary tree without recursion I was going through

  • 0

Possible Duplicate:
Post order traversal of binary tree without recursion

I was going through the inorder traversal algorithm in a binary tree by Morris.
Can someone please suggest whether there is a way to traverse postorder without using recursion and stack?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:38:24+00:00Added an answer on June 4, 2026 at 5:38 am

    You can do this with a threaded tree. Here’s an outline of the method (taken from here—see slide 31):

    • Postorder: a dummy node created that has root as left descendant.
    • A variable can be used to check type of current action.
    • If action is left traversal and current node has a left descendant, then descendant
      is traversed. Otherwise action changed to right traversal.
    • If action is right traversal and current node has a left descendant, action changed
      to left traversal. Otherwise action changed to visiting a node.
    • If action is visiting node: current node is visited, afterwards its postorder successor
      has to be found.
    • If current node’s parent accessible through a thread (i.e. current node is parent’s
      left child) then traversal is set to continue with the right descendant of parent.
    • If current node has no right descendant, this is the end of the right-extended chain
      of nodes.
    • First: the beginning of the chain is reached through the thread of the current node.
    • Second: right references of nodes in the chain is reversed.
    • Finally: chain is scanned backward, each node is visited, then right references are
      restored to previous settings.

    As the above reference goes on to show, it can also be done without threading if you use temporary modifications to the tree structure.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: android steganography Has anyone implemented steganography on android? Can anyone post sample
Possible Duplicate: Facebook Connect error: can't post to wall in iPhone I had a
Possible Duplicate: Can I write native iPhone apps using Python this post Can I
Possible Duplicate: In what order does evaluation of post-increment operator happen? Consider the following
Possible Duplicate: Can we post image on twitter using twitter API in Android? I
Possible Duplicate: JavaScript post request like a form submit I have a value calculated
Possible Duplicate: PHP detecting request type (GET, POST, PUT or DELETE) This should be
I need some help with recursion. I'm trying do a binary tree in C#,
Possible Duplicate: How secure is a HTTP POST? I need to send sensitive information
Possible Duplicate: How secure is a HTTP POST? Suppose I have a login page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.