Keeping a balanced binary tree!

Started by
0 comments, last by cMADsc 22 years, 1 month ago
Greetings all, What is the best way to keep an binary tree balanced? I been looking at articles and the only "well" documented one stated: 1) copy all the elements into another array in ascending order. 2)clear tree 3) re-add the elements(the middle element in the array would be the new parent). Any assistance is sure appreciated. Thx! ----------------------------- "There are ones that say they can and there are those who actually do." "...u can not learn programming in a class, you have to learn it on your own." Edited by - cMADsc on February 25, 2002 6:17:06 PM
-----------------------------"There are ones that say they can and there are those who actually do.""...u can not learn programming in a class, you have to learn it on your own."
Advertisement
Google for Red-black trees, AVL-trees and splay trees. This might also be a good place to look: http://www.nist.gov/dads/
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]

This topic is closed to new replies.

Advertisement