Question
Solution Preview
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.
#include <stdlib.h>#include "avl.h"
/**
* new tree
* @return
*/
node * newTree(){
node * t = (node *)malloc(sizeof(node));
t->height = -1;
t->left = NULL;
t->right = NULL;
t->parent = NULL;
return t;
}
/**
* new tree
* @param item
* @param parent
* @return
*/
node * newTrees(int item, node * parent){
node * t = (node *)malloc(sizeof(node));
t->item = item;
t->height = -1;
t->left = NULL;
t->right = NULL;
t->parent = parent;
return t;
}...