AVL.c
// A utility function to left rotate subtree rooted with x
// See the diagram given above.

A utility function to left rotate subtree rooted with x
See the diagram given above.
A utility function to left rotate subtree rooted with x See the diagram given above .
struct Node *leftRotate(struct Node *x)
{
	struct Node *y = x->right;
	struct Node *T2 = y->left;
	y->left = x;
	x->right = T2;
	x->height = maximum(height(x->left), height(x->right)) + 1;
	y->height = maximum(height(y->left), height(y->right)) + 1;
	return y;
}
struct Node * leftRotate ( struct Node * x ) { struct Node * y = x -> right ; struct Node * T2 = y -> left ; y -> left = x ; x -> right = T2 ; x -> height = maximum ( height ( x -> left ) , height ( x -> right ) ) + 1 ; y -> height = maximum ( height ( y -> left ) , height ( y -> right ) ) + 1 ; return y ; }
A utility function to left rotate subtree rooted with x
See the diagram given above.
A utility function to left rotate subtree rooted with x See the diagram given above .
// Perform rotation
 //  Update heights
 // Return new root
