Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: avizitPosted on 2004-08-28 at 22:30:18ID: 11924488
Binary Trees are trees where every node has at most 2 child. The left child and the right child
erence/pro gramming/f eatures/tr ees2/ page2 .asp
So to implement a binary tree as an array
you take array[0] as the root of the binary tree
and its two child are array[1] , --left child
array[2] - right child
similarly array[1] as two child left-> array[3] and right -> array[4]
so basically each node "i" has two children the left child is array[2i +1 ] and right child is array[2i +2 ]
now you have to sort the binary tree
for representation also read "Arrayed Binary Trees" in http://www.gamedev.net/ref