By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,389 Members | 1,878 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,389 IT Pros & Developers. It's quick & easy.

Tricky postorder without recursion

P: 2
I am sorry if this was allready asked or discussed, please redirect me.

I have to make the program of postorder traversal of the binary search tree NOT using recursion. I have found many solutinos using recursion but I can't figure 1 without recursion. Can you help me and tell me the code? Please.
With recursion:
Expand|Select|Wrap|Line Numbers
  1. void postorder(struct node *bt)
  2. {
  3. if(bt!=NULL)
  4. {
  5. postorder(bt->left);
  6. postorder(bt->right);
  7. printf("[ %d ]\t",bt->data);
  8. }
  9. else
  10. return ;
  11. }
Without recursion:
Nov 3 '06 #1
Share this Question
Share on Google+
2 Replies

P: 2
Thank you for the replies! Useless...
Nov 12 '06 #2

P: 13,264
Thank you for the replies! Useless...
Nov 12 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.