Aspects


vs


Home Page
About Us
Feedback

Inorder

A method of traversing binary trees, in which the node is processed after its left child, but before its right child.

Postorder

A method of traversing binary trees, in which the node is processed after its children.



Others

Example

Postorder is trickier because the stack has to store nodes to visit and nodes to process and they aren t always simply related like they are in the inorder case

from question  

Intuitive explanation of binary tree traversals without recursion

However the other posters are right java doesn t expose any of the tree mechanics so a preorder or postorder isn t possible at this view;you can at least do the inorder walk using the iterator and a for each loop

from question  

Java TreeMap sorting options?

Back to Home
Data comes from Stack Exchange with CC-BY-SA-4.0