cool , i had the solution of removing the leaf node from the array after printing, but your solution is better its not updating the index++ instead index+1, nice !!!
Here we're solving via preorder. You can take a cue from following video, where we're executing preorder without recursion. : th-cam.com/video/qv1nLlk5LEU/w-d-xo.html
Most underrated channel
Thanks. Please share the channel content with your friends.
@@CodingSimplified defently already suggested your binary tree playlist to many of my friends please do more videos
@@sivaganesh4489 Thanks.
wish I could know this channel before ❤️ lovely explanation brother ❤️
Thanks for your nice feedback. Keep Watching.
cool , i had the solution of removing the leaf node from the array after printing, but your solution is better its not updating the index++ instead index+1, nice !!!
Thanks for nice feedback. Keep Watching.
How about using stack instead of array? (no need to manage index). If ( node is leaf) { print stack; pop node; return}
How we can solve this problem using iteration ??
Here we're solving via preorder. You can take a cue from following video, where we're executing preorder without recursion. : th-cam.com/video/qv1nLlk5LEU/w-d-xo.html
Easily using Iterative preorder and a map to have a check of nodes visited or not.
do not waste your time by watching this video
thank you very much :)
Thanks for your nice feedback. Keep Watching.