Why is my code showing compilation error:
CPP:Delete nodes from BST
Hi @Riankk there was a small mistake in line 45, i have fixed it here https://ide.codingblocks.com/s/200966
I ran the current program, but the code is generating wrong output .
@Riankk this is because your delete function is wrong. If root->right is NULL, and root->left is NOT NULL, then you should return the value that is not null, but you are doing the opposite. Have a look, https://ide.codingblocks.com/s/201222 made changes in line 54, 59.