why code is giving segmetatio fautlt
Delete node from bst
I have made few changes in the code and the reason in the comment.
@dakshi
hello dakshi,
![]()
in this line replace root->left with root->rigth.
because we are replacing replacing root->data with inorder succesor. which is in right subtree.
so after replacing to delete inorder successor we need to call same function on right subtree.