PLEASE MAKE CHANGES IN MY CODE AND COMMENT THOSE CHANGES
Here is my code: https://ide.codingblocks.com/s/245130
MY CODE IS NOT PRODUCING ANY OUTPUT
hello @navin_japes
a)

here u should create new node with data d and return its address .
b)
![]()
this return statement should be outside of while loop.
c)
add cout<<"\n"; after printing preorder.
I AM GETTING SEGMENTATION FAULT NOW CAN YOU TELL WHERE IS THE MISTAKE HERE IS MY UPDATED CODE: https://ide.codingblocks.com/s/245130
declare ur root inside while loop and initialise it with NULL.
when u r deleting leaf node then return NULL.
check ur corrected code here -> https://ide.codingblocks.com/s/248304
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.