AVL.c
/* Helper function that allocates a new node with the given key and
NULL left and right pointers. */
Helper function that allocates a new node with the given key and
NULL left and right pointers.
Helper function that allocates a new node with the given key and NULL left and right pointers .
struct Node* newNode(int key)
{
	struct Node* node = (struct Node*)
		malloc(sizeof(struct Node));
	node->key = key;
	node->left = NULL;
	node->right = NULL;
	node->height = 1;  
	return(node);
}
struct Node * newNode ( int key ) { struct Node * node = ( struct Node * ) malloc ( sizeof ( struct Node ) ) ; node -> key = key ; node -> left = NULL ; node -> right = NULL ; node -> height = 1 ; return ( node ) ; }
Helper function that allocates a new node with the given key and
NULL left and right pointers.
Helper function that allocates a new node with the given key and NULL left and right pointers .
// new node is initially added at leaf
