Delete node in BST


Please check where my code is wrong.

Hello @ashish_meher,

I would suggest you, watch the video of your course: CPP - BST - Deletion

Your code doesn’t even have the base case:
if(root == NULL)
return NULL;

Watch it first and let me know if you don’t understand anything.


I changed the code a little bit.
Please check where is the mistake?

@S18ML0016 Check the above link

Hello @ashish_meher,

The code you have implemented to create bst is wrong and not creating the bst.
You can refer to the following code:

Let me know, if you don’t understand something.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.