in main i create struct node* root, and insert other nodes, after this I apply this function to root:Code:struct node { int data; struct node* left; struct node* right; };
The program crashes when I try to display the BST again. I guess the deleteMin function somehow deletes the entire BST.PLease help and thank you in advanceCode:void deleteMin(struct node* t){ struct node* temp; if(t!=NULL){ if(t->left!=NULL) deleteMin(t->left); else{ temp=t; t=t->right; free(temp); } } }