Tree Traversals
According to the tree at http://www.geocities.com/beamer7296/images/tree.JPG, can someone please check my traversals below to see if thry're all correct!?! I'd really appreciate it!
Level-order traversal - A, B, D, E, F, H, J, K, M, Q, R, S, T, U, C, W, X, Y
Preorder traversal - A, B, E, K, X, T, Y, U, M, F, D, H, Q, C, W, J, R, S
Postorder traversal - K, X, T, Y, U, M, E, F, B, C, W, Q, H, R, S, J, D, A
Inorder traversal - K, E, M, T, X, U, Y, B, F, A, D, H, Q, C, W, J, R, S
[511 byte] By [
beamer7296] at [2007-11-11 8:18:22]

# 1 Re: Tree Traversals
According to the tree at http://www.geocities.com/beamer7296/images/tree.JPG, can someone please check my traversals below to see if thry're all correct!?! I'd really appreciate it!
Level-order traversal - A, B, D, E, F, H, J, K, M, Q, R, S, T, U, C, W, X, Y
Preorder traversal - A, B, E, K, X, T, Y, U, M, F, D, H, Q, C, W, J, R, S
Postorder traversal - K, X, T, Y, U, M, E, F, B, C, W, Q, H, R, S, J, D, A
Inorder traversal - K, E, M, T, X, U, Y, B, F, A, D, H, Q, C, W, J, R, S
Your level- and post-order traversals are correct. The other two are incorrect.
# 2 Re: Tree Traversals
Your level- and post-order traversals are correct. The other two are incorrect.
pretty new at this too.. Let's see... isn't pre-order:
A, B, E, K, M, T, X, U, Y, F, D, H, Q, C, W, J, R, S
and in-order:
K, E, T, X, M, Y, U, B, F, A, C, Q, W, H, D, R, J, S
trees are fun... :) if there's anything wrong can you bolden which? Thanks.