Delete nodes from bst

https://ide.codingblocks.com/s/58350 please check error in my code…

this is not resolved

Hi Neeraj, you have not taken the number of testcases as an input. Check the input format properly.

no that is not a problem. the main problem is that code is giving correct output…please check hit the run command

I am trying to use O(N) method to generate the tree , but it is passing only one test case,it does passes all the test cases using the other naive method by inserting each node again and again in O(N^2) , but why is this method failing…?

plz resolve my doubt
@jaiskid @Khushboo