Delete Node from bst doubt


tell me where i am lagging?..

@Aryanomar00
In this problem , in the particular case when the node to be deleted has two children , you are picking the inorder successor ( min value from right subtree ) as its replacement. However the online judge in this problem expects you to choose inorder predecessor ( max value from left subtree ) as its replacement. While both are suitable candidates for being the replacements , it depends from problem to problem which they ask. Make the according changes and let me know if you need any help with it.

https://ide.codingblocks.com/s/112365…sir there are lot of errors please update my code.

@Aryanomar00
This code is for a different problem as it seems.
Particularly , creating tree from preorder and inorder input as I could make out from it.
I request you to create a seperate Doubt for it as it is best to discuss a single doubt over one thread to avoid confusion and so you can get the best out from the Doubt Support System.