I think first s=pop() in while is not the right approach. This is an
alternate approach where explored() checks if the node is visited or
not... hence discarding that path.. and I think the following handles
the null conditions as well.. (ex given by chandra)
void postOrderTraversal(Tree *root)
Hi,
Need more details about explored( Node * ) function,
Consider the NULL input
if your explored( NULL ) returns true then I guess that every thing
works fine, and also most of your checks could be eliminated ( code will
become simpler )
if your explored( NULL ) returns false,