question: private void rotateLeft ( Node < K , V > root ) { Node < K , V > left = root . left ; Node < K , V > pivot = root . right ; Node < K , V > pivotLeft = pivot . left ; Node < K , V > pivotRight = pivot . right ; root . right = pivotLeft ; if ( pivotLeft != null ) { pivotLeft . parent = root ; } replaceInParent ( root , pivot ) ; pivot . left = root ; root . parent = pivot ; root . height = Math . max ( left != null ? left . height : 0 , pivotLeft != null ? pivotLeft . height : 0 ) + 1 ; pivot . height = Math . max ( root . height , pivotRight != null ? pivotRight . height : 0 ) + 1 ; }
target:  Rotates the subtree so that its root's right child is the new root.