Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,506 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,691 people online right now. Registration is fast and FREE... Join Now!




pre order sequence

 
Reply to this topicStart new topic

pre order sequence, figure shows a, b to left,c to right and d in middle of b and c with a

donaldh
4 Aug, 2008 - 11:58 AM
Post #1

New D.I.C Head
*

Joined: 22 Apr, 2008
Posts: 21

the preorder sequence is

I believe it s A B D C

can anyone confirm this

Thks
User is offlineProfile CardPM
+Quote Post

NickDMax
RE: Pre Order Sequence
4 Aug, 2008 - 01:27 PM
Post #2

2B||!2B
Group Icon

Joined: 18 Feb, 2007
Posts: 2,858



Thanked: 50 times
Dream Kudos: 550
My Contributions
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..............

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 08:40PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month