the preorder sequence is
I believe it s A B D C
can anyone confirm this
Thks
pre order sequencefigure shows a, b to left,c to right and d in middle of b and c with a
Page 1 of 1
1 Replies - 3731 Views - Last Post: 04 August 2008 - 02:27 PM
Replies To: pre order sequence
#2
Re: pre order sequence
Posted 04 August 2008 - 02:27 PM
Could you please post your entire question inside the post and try to make it clearer.
preorder generally refers to the way one may traverse a tree, so for example if you have the tree:
........A........
....B.......C...
..D..E...F...G
Than the pre-order traversal would be A B D E C F G
1. Visit the root first
2. Traverse the left subtree
3. Traverse the right subtree.
If i had a pre-order traversal of ABDC than would would have a tree like:
........A........
....B.......C...
..D..............
preorder generally refers to the way one may traverse a tree, so for example if you have the tree:
........A........
....B.......C...
..D..E...F...G
Than the pre-order traversal would be A B D E C F G
1. Visit the root first
2. Traverse the left subtree
3. Traverse the right subtree.
If i had a pre-order traversal of ABDC than would would have a tree like:
........A........
....B.......C...
..D..............
Page 1 of 1

New Topic/Question
Reply



MultiQuote



|