Level order zig zag

getting fault https://ide.codingblocks.com/s/318991

hello @guptashubham210a neither you were taking input in the correct way neither you doing level 0rder in the correct way .
in the function you are doing with the help of stack .
but this should be done with the help of queue.
both the data strucutures have different functionalities…
https://ide.codingblocks.com/s/319146 link for the corrected code …
i hope i have cleared yor doubt .
Happy Learning !!

hello @guptashubham210a as you are not replying i am marking this doubt as resolved.
on or off the chance if you feel you still have any query you can open this again .
Happy Learning !!

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.