Level order traversal of Binary Tree | Step by step demo with example | Study Algorithms
HTML-код
- Опубликовано: 11 июл 2024
- When you look at a binary tree, the first thing you might see is that each node is at a different height. This simply implies that you can traverse the tree level by level as well. For each level you go left to right, hence the element that is seen first should be processed first. Given this information we can take the help of a queue data structure to perform a level order traversal of binary tree. Watch this video to see a step by step procedure with a code sample written in JAVA.
Chapters:
00:00 - Intro
01:10 - What is level order traversal?
03:55 - Logic of level order traversal
09:32 - Dry-run of code
13:31 - Final Thoughts
📚 Links to topics I talk about in the video:
Understanding a Binary Tree: • Understanding Tree Dat...
Queue Data Structure: • Queue Data Structure e...
Playlist on Trees: • Trees
📘 A text based explanation is available at: studyalgorithms.com
Code on Github: github.com/nikoo28/java-solut...
📖 Reference Books:
Starting Learn to Code: amzn.to/36pU0JO
Favorite book to understand algorithms: amzn.to/39w3YLS
Favorite book for data structures: amzn.to/3oAVBTk
Get started for interview preparation: amzn.to/39ysbkJ
🔗 To see more videos like this, you can show your support on: www.buymeacoffee.com/studyalg...
🎥 My Recording Gear:
Recording Light: amzn.to/3pAqh8O
Microphone: amzn.to/2MCX7qU
Recording Camera: amzn.to/3alg9Ky
Tablet to sketch and draw: amzn.to/3pM6Bi4
Surface Pen: amzn.to/3pv6tTs
Laptop to edit videos: amzn.to/2LYpMqn
💻 Get Social 💻
Follow on Facebook at: / studyalgos
Follow on Twitter at: / studyalgorithms
Follow on Tumblr at: / studyalgos
Subscribe to RSS feeds: studyalgorithms.com/feed/
Join fan mail: eepurl.com/g9Dadv
#binarytrees #programming #traversal
Excellent! I was able to solve the Zig zag tree using this. Thanks a lot!
Your explanation is really helpful. Thank you.
Finally I got the best solution.
I would recommend your videos for everyone who is learning DS on RUclips.
Your videos are well defined for beginners.
Thank you for your efforts. 🙏
A Great Video Course! Thank you for explaining it in a clear way.
Your explanation is the best on youtube
great clarification !
You're a real teacher. Thank you Dear.
So nice of you
u r the best . thaNKS FOR EXISTING SIR . YOU HELPED ME NAIL IT
Great explanation! Thankyou!
You're very welcome!
Thank you sir.
Woww! I have watched almost every video of top youtubers but can't get. Now I get it😍 Thank you sir
Most welcome 😊
Hi bro! I recently started following your videos, they are really awesome the way you are explaining can make any noob to pro. More power and love to you bro keep growing bro❤
A new video every week 😄
really great explanation bro
all the best
You are very good 👍
Thank you! Cheers!
nice video, can you do more about trees?
Check out my playlist on trees. It has a bunch of stuff
Do some videos on views of a tree
you mean like a left view and a right view?
@@nikoo28 yes