Delete Nodes from BST

I am getting run error in all the test cases except one.https://ide.codingblocks.com/s/395988

Please someone help me.