Page 1 of 1

Need help regarding creation of binary tree

Posted: Tue Jun 16, 2009 8:00 am
by prashu09
I have to create a binary tree which will me automatically maintained when ever a new user is added.
suppose A is the top node. he adds two L1 as left and R1 as right.
after this level, the next user is added under L2 by A. if L2 has already added in his left of L1 then A can add in right of L2 as L2R2.
similarly this concept is maintained for each user under the top. Any uesr can add under his and the tree is changed for his lower ones.
Kindly help me to automatic gerneration of tree.