will visit node after it has visited all the other nodes in the subtree rooted at (see figure figure of figure postorder traversal of the ordered tree the analysis of the running time of postorder traversal is analogous to that of preorder traversal (see section the total time spent in the nonrecursive portions of the algorithm is proportional to the time spent visiting the children of each node in the tree thusa postorder traversal of tree with nodes takes (ntimeassuming that visiting each node takes ( time that isthe postorder traversal runs in linear time as an example of postorder traversalwe show java method tostringpostorder in code fragment which performs postorder traversal of tree this method prints the element stored at node when it is visited code fragment method tostringpostorder(tvthat performs postorder printing of the elements in the subtree of node of the method implicitly calls tostring on elementswhen they are involved in string concatenation operation