Wrong answer in BST operations

I’m getting wrong answer in BST operations question. I checked my code but couldn’t find error in my code. Could anyone please tell me what’s wrong in this code?

problem link : BSTOPS Problem - CodeChef

My solution : CodeChef: Practical coding for everyone

Thanks in advance.