whenever you can' complete an insertion because of the can' insertneeds color flip message the resulting arrangement is shown in figure figure subtree motion during rotation position the arrow on the root now press ror wow(or is it wow? lot of nodes have changed position the result is shown in figure here' what happensthe top node ( goes to its right child the top node' left child ( goes to the top the entire subtree of which is the root moves up the entire subtree of which is the root moves across to become the left child of the entire subtree of which is the root moves down you'll see the errorroot must be black message but you can ignore it for the time being you can flip back and forth by alternately pressing ror and rol with the arrow on the top node do this and watch what happens to the subtreesespecially the one with as its root the figures show the subtrees encircled by dotted triangles note that the relations of the nodes within each subtree are unaffected by the rotation the entire subtree moves as unit the subtrees can be larger (have more descendantsthan the three nodes we show in this example no matter how many nodes there are in subtreethey will all move together during rotation human beings versus computers this is pretty much all you need to know about what rotation does to cause rotationyou position the arrow on the top nodethen press ror or rol of coursein real redblack tree insertion algorithmrotations happen under program controlwithout human intervention notice however thatin your capacity as human beingyou could probably balance any tree just by looking at it and performing appropriate rotations whenever node has lot of left descendants and not too many right onesyou rotate it rightand vice versa