Binary Trees in Python: Introduction and Traversal Algorithms

preview_player
Показать описание
This video is sponsored by Oxylabs. Oxylabs provides market-leading web scraping solutions for large-scale public data gathering. You can receive data in JSON or CSV format and pay only per successful request. At the moment, Oxylabs offers a free trial.

In this video, we will go over the binary tree data structure. We then go over how to implement this data structure in Python. We then cover the three recursive depth-first search traversal algorithms (preorder, inorder, and postorder) and implement those recursively in Python.

The software written in this video is available at:

The slides for this video can be found here:

Do you like the development environment I'm using in this video? It's a customized version of vim that's enhanced for Python development. If you want to see how I set up my vim, I have a series on this here:

If you've found this video helpful and want to stay up-to-date with the latest videos posted on this channel, please subscribe:
Рекомендации по теме
Комментарии
Автор

Note that @26:30 I call the "inorder" traversal function inside of the "postorder" traversal function and neglected to change it to postorder. This was a copy-paste error. You can fix it by changing the "inorder" call in postorder to the appropriate postorder call. Sorry for the mistake, and thanks for watching!

LucidProgramming
Автор

Thank you for the great tutorial! I am a new developer still looking for a job after graduation from a boot camp. I never had a chance to learn the data-structure, dfs, bfs etc before. Now, it's getting clear to me step by step after watching the videos you posted.

bijayamanandhar
Автор

wow - it is awesome !!!
i can tell one analogy that helped me a lot : when do i collect the value :
• pre-order - when value collected ?: once I am hovering on a node I am collecting it's value.
• in-order - when value collected ?: if the node has no left node or the left node is already visited then add this value.
• post-order - when value collected ?: once the node has no left nor right or left and right has been already visited then I will collect the value.
HTH

edgarlip
Автор

I was stuck for hours trying to understand this, you made it so simple! Thank you so much

turjo
Автор

Your explanation to data structure concepts in python is THE best!

rhythmsaparia
Автор

Hands down the best explanation, I've struggled for so long trying to get the intuition through my textbook. Thanks!

safderaree
Автор

This is the most simplified video tutorial with good examples, the best I have seen so far. I got everything after watching this video only once. A lot of online tutorials are just too ambiguous and really confusing. Lucid you're the best for sure. Thanks a lot

muhammadsalisabdulsalam
Автор

Too excited to sleep now! I finally understand it! Best video on Traversal Algorithms explanation! Consider watching all your python video!

enkaibi
Автор

Great Video! Thank you for visualising and really emphasizing on the most basic aspects as this is something which I personally as a Beginner seem to struggle with!
Keep up the good work it is really appreciated!

chrisgoehl
Автор

Very informative and easy-to-understand tutorial. Thank you for this incredible contribution to the enthusiasts and learners!

bhaskarbhuyan
Автор

I appreciate the good video and clear explanation. With a little more editing and attention to detail, it can become more polished and will be excellent.

dmgisi
Автор

God bless you Sir. I have been following your tutorials for a while and you are a LEGEND

hassanfarah
Автор

i really love the way you are explaining all these concepts in very effective manner thanks for this :)

reccartoon
Автор

very good video for those who want to pick the grasp of binary tree quickly

Unknown_-zc
Автор

Best Explanation
recursion is bit confusing but following each step through example made it easy... Thanks

bhuwansharmaa
Автор

Nice introduction! Thanks to support the TI community.

wyllerdesousa
Автор

Большое спасибо за ваше видео)
Это потрясающе, я посмотрел ваш Гайд по связным спискам и теперь я тут. Лучшие видео по этой теме!)

ПавелТаранов-эч
Автор

Thank god I looked at the comments regarding the issue with the post order function, I spent a good 10 mins looking to see if I had the wrong implementation

nero
Автор

Best video I've seen on this topic. Thank you!

jethrotalavera
Автор

All Superheroes don't Wear Capes. Some wear Suit too :)

jayaramakapil