My code is working fine for the sample input but showing wrong answer for the testcase. Plzz rectify the error in my code.
code link : https://ide.codingblocks.com/s/104894
Test case is not passing for my code
Your ‘remove’ function is correct but your tree construction is wrong. You have assumed that the inorder traversal of nodes is given but actually the nodes have to be added to tree in the order in which they are given. So, you have to write a function addNode, which will create your tree by adding nodes at their correct position in the BST.
thank u i have already done my changes.
Okay, if you don’t have any further queries about this question then please mark the doubt as resolved