1. After an operation that modifies a balanced tree (see balanced tree), to restore the tree's {balance (@pxref{{balance}) condition}, typically by rotation (see rotation) or, in a {red-black (@pxref{{red-black}) tree}, changing the color (see color) of one or more nodes. 2. To reorganize a binary search tree (see binary search tree) so that its shape more closely approximates that of a complete binary tree (see complete binary tree).