what is the use of else if in line 106 and else condition in line 138,the code works fine even if we donot use these conditions since the program is for deletion and the code for that is in else if of lne 110
Binary search tree(BSt)-deletion
Hi @Vibhuti0206
Basically all these if and else cases are necessary because they have their own role. All if and else of line
106 ,110 and 138 is for searching the node which is to be deleted. If and else of line 106 and 138 then calls
to left and right subtree to search for that key value and delete it. And else if of line 110 do the main part of deleting the node.