Insertion
struct node* newNode(int new_data) {
struct node* temp = (struct node*)malloc(sizeof(struct node));
temp->data = new_data;
temp->left = NULL;
temp->right = NULL;
return temp;
}
void Insert(struct node** root, int key) {
if ((*root) == NULL) {
*root = newNode(key);
}
if (key < (*root)->data) {
Insert(&(*root)->left, key);
}
if (key > (*root)->data) {
Insert(&(*root)->right, key);
}
}