Here i have implemented this delete(named “deletee”) function on my own after learning the logic from video.
Please could you confirm if it right or wrong.
For me it seems correct.
Check my "deletee" function
hello @ashishnnnnn please share your code so that i can see .
and please share your code by saving it on ide.codingblocks.com
Sorry i forgot to share … the code…
hey @ashishnnnnn there are certain things which are wrong in your delete fucntion .
i am giving you the correct delete function ,if you will go through it you will be able to find differences .
.in case you dont understand anything please ask here .
Happy Learning !!
Hii… I have gone through the code…
It also look somewhat same… Can you point me where my code is wrong.
I want to understand that(my mistake)
Thanks
Hii …
Only one part i was missing in my code…
i.e in deletee function if the root itself is NULL, then i have to return NULL, this case i have not considered.
@ashishnnnnn you were not checking whether right is null and left is not null and vice versa.
you have to make separate two conditions for this just like i did.
and in starting you have to check if the root is no null because if it is null there is no point of deleting .
3.there one or two small errors in if part of the function.
Yaa… That is the error…
Thank you very much, it got accepted NOw.
Thanks :)
please mark both of your doubts as resolved .
Yaa… Done That