Where am I going wrong in build tree function.can you tell me my error please.
PRINT THE LEAF NODES
You have to use take input level order wise
so use the same logic as used in printing level order traversal
I have corrected your code and now it is running fine
Modified code
I hope your doubt is resolved kindly give feedback from below link
if not feel free to ask your doubt
@dips123deepali_c25f140838182212
kindly give your feedback asap, it hardly takes a min
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.
why r we doing q.push(f->left) and right also
in line no 27 and 31