Binary Tree Bootcamp: Full, Complete, & Perfect Trees. Preorder, Inorder, & Postorder Traversal.

preview_player
Показать описание

📹 Intuitive Video Explanations
🏃 Run Code As You Learn
💾 Save Progress
❓New Unseen Questions
🔎 Get All Solutions

Full Binary Tree: Every node (besides children) has exactly 2 children (the maximum children a node can have in a binary tree).

Complete Binary Tree: Every level, except possibly the last, is completely filled, and all nodes are as far left as possible.

Perfect Binary Tree: All interior nodes have two children and all leaves have the same depth or same level. Perfect binary trees are both full and complete.

Preorder Traversal: node left right

Inorder Traversal: left node right

Postorder Traversal: left right node

++++++++++++++++++++++++++++++++++++++++++++++++++

Рекомендации по теме
Комментарии
Автор

Table of Contents:

A Quick Message 0:00 - 0:31
What We Are Going To Do 0:31 - 0:52
Full Binary Trees 0:52 - 1:38
Complete Binary Trees 1:38 - 2:14
Perfect Binary Trees 2:14 - 3:18
Let's Discuss The 2 Fundamental Traversals 3:18 - 3:42
How To Know Which Traversal Is Which 3:42 - 5:05
Think of Recursion Like This. 5:05 - 5:33
Preorder Traversal Walkthrough 5:33 - 11:15
Inorder Traversal Walkthrough 11:15 - 14:25
We Realize That This Is A Special Tree 14:25 - 15:07
Postorder Traversal Walkthrough 15:07 - 18:59
Briefly Addressing Time Complexity 18:59 - 19:22
Wrap Up 19:22 - 19:40

At 1:42 I meant that binary heaps are complete binary trees with the heap ordering property. Not that a complete binary tree is always a heap.

The code for the traversals is in the description. All recursive and basically the same function. We will do iterative and O(1) space traversals soon.

BackToBackSWE
Автор

Omg writing "lnr" at each node really clear this up for me. Thank you!

JossinJax
Автор

This channel is a shiny gem among a sea of low quality CS channels. Please keep it up.

alexandergonzalez
Автор

I've gotta say; I've worked at Amazon and Lyft, where you'd think people have their fundamentals down like crazy, but they can't explain simple topics like these. You, sir, have the gift of teaching. Thanks for your help!

Moitaytay
Автор

Showing these traversal with a "n" saved my

swimmingbyrd
Автор

This video was amazing. I don't really comment on videos, but I had to express my appreciation to you for creating this. I got an interview about a month ago and this was the first of many videos I watched of yours while I was preparing. This past week I found out that I got the job and you were a big part of that. I'm not sure if you'll see this, but I hope you know that your videos have helped me and many others. Please continue to make awesome informational content like this!

prashmokk
Автор

I don't know how to thank you. You have saved me hours of reading a Data Structures Textbook 3 times just to get this concept. Very thankful. Please do not stop your great work

travissimelane
Автор

A channel like yours pushing quality CS videos is really really in need... Thank you so much for your efforts. Most of what's on youtube is low-quality Indian content (no hate). Again thank you so much and please dont stop! I would recommend some videos on Algorithm designs like divide and conquer, greedy method etc.

ftedg
Автор

I always assumed this was a super complicated topic and have been putting it off as long as possible. You just made it so simple and easy to understand. Thank you. I think I just found my new favorite channel!

MM-lotk
Автор

I don't know who's those people who dislike such informative video. Great efforts, keep doing.

manojchoudhary
Автор

a lot of channels would have taken shortcuts to fast-forward or just breeze by each node explanation because it might feel redundant.. but man so thankful you understand repetition is an important part of education.

dansteryoo
Автор

WOW. Watched a bunch of videos by different people on traversals, everyone else just mumbles on and on "print this, skip this and print that" without explaining why, and you're THE ONLY ONE who actually explains the whole recursion thing in detail. THANK YOU SO MUCH!

backupramdisk
Автор

The only person with charisma to teach Data Structures, I love it! (mosh is also good but you are pure gold)

marilu
Автор

I've been struggling with data structures and algorithms, and this really made things a lot clearer, thank you so much!

crewelghoul
Автор

I'm a Sr. Software Development Engineer who got here without ever taking any CS courses, and now I am hurting for that. This dude here is giving me the exact info I need to fill in the blanks. Bravo dude!

sasbazooka
Автор

The way this guy walks through these examples is crystal clear.

josephwong
Автор

I am a math student targeting for a data science career And I have to say this is the BEST computer science video I have even seen! Just AMAZING!

shenzheng
Автор

I have looked at so many videos to understand this. This is the first video that made me understand it:) The recursive way of thinking was really helpful to understand this

mhaland
Автор

I have watched dozens of similar videos, I can tell you, this guy is amazing. The way he provides the material is unbelievable, so motivated, so much energy, so much positive things can be felt.

fanifyeyev
Автор

Nice job, you are making Africans very proud of your content. I'm sure your Ethiopian/Eritrean brothers and sisters agree.

MalamIbnMalam