|
Home Terms and Types Binary Trees Traversals Quiz |
The output will be A,B,D,C,E,H,F,G,H,I We will talk about three: In-order Pre-order Post-order
First you visit the left subtree, then the root (or parent node), and then the right subtree (recursively). The output for this traversal would be B,C,A,F,E,G,D,I,H First you visit the root (or parent node), then the left subtree, and then the right subtree (recursively). The output for this traversal would be A,B,C,D,E,F,G,H,I First you visit the left subtree, then the right subtree, and then the root (or parent node) (recursively). The output for this traversal would be C,B,F,G,E,I,H,D,A |