asad

asad

  • NA
  • 3
  • 0

create tree which have common child using C#

Jul 7 2010 7:52 AM

i have to create a tree using C# which have common child....this is C# console program..for example..

A>father

B> left-child of A
C>right-child of A

D>left-child of B
E>right-child of B

E>left-child of C
F>right-child of C

so E is common in both B and C

tree shape would be: 
         A
      B     C
    D   E   F
   G   H   I   J
                  

the tree wud be keep extended next level and so on....

i used link list to solve this problem...but having problem  to track common node/child....could any body plz help me.....or any alghorithom....thank you


Answers (1)