Sack Library Documentation
sack::containers::BinaryTree::BalanceBinaryTree Function
__cdecl TYPELIB_PROC void BalanceBinaryTree(PTREEROOT root);

Balances a binary tree. If data is added to a binary list in a linear way (from least to most), the tree can become unbalanced, and all be on the left or right side of data. This routine can analyze branches and perform rotations so that the tree can be discretely rebalanced.

// AddBinaryNode...
BalanceBinaryTree( tree );
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!