previous | start | next

The double rotation

 /*
      * item inserted to right of t and left of t.right.
      * node t is unbalanced and requires two rotations
      *
      * 1. rotate t.right to the right and attach the new subtree root to t.right
      * 2. rotate t to the left and return the new subtree root
      */

 


   


previous | start | next