the term black height is used to describe the number of black nodes from between given node and the root in figure the black height of is of is still of is and so on rotations to balance treeit' necessary to physically rearrange the nodes if all the nodes are on the left of the rootfor exampleyou need to move some of them over to the right side this is done using rotations in this section we'll learn what rotations are and how to execute them rotations are ways to rearrange nodes they were designed to do the following two thingsraise some nodes and lower others to help balance the tree ensure that the characteristics of binary search tree are not violated recall that in binary search tree the left children of any node have key values less than the nodewhile its right children have key values greater or equal to the node if the rotation didn' maintain valid binary search tree it wouldn' be of much usebecause the search algorithmas we saw in the last relies on the search-tree arrangement note that color rules and node color changes are used only to help decide when to perform rotationfiddling with the colors doesn' accomplish anything by itselfit' the rotation that' the heavy hitter color rules are like rules of thumb for building house (such as "exterior doors open inward")while rotations are like the hammering and sawing needed to actually build it simple rotations in experiment we tried rotations to the left and right these rotations were easy to visualize because they involved only three nodes let' clarify some aspects of this process what' rotatingthe term rotation can be little misleading the nodes themselves aren' rotatedthe relationship between them changes one node is chosen as the "topof the rotation if we're doing right rotationthis "topnode will move down and to the rightinto the position of its right child its left child will move up to take its place remember that the top node isn' the "centerof the rotation if we talk about car tirethe top node doesn' correspond to the axle or the hubcapit' more like the topmost part