Data structures: Binary Tree

preview_player
Показать описание
See complete series on data structures here:

In this lesson, we have discussed binary tree in detail. We have talked about different types of binary tree like "complete binary tree", "perfect binary tree" and "balanced binary tree" and their properties. We have also discussed how cost of operations in a tree may depend upon height of the tree and why we want a tree to be dense and its height to be minimum. Finally, we talked about two possible implementations of binary tree - a) using dynamically created nodes and b) using arrays.

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

Felt very sad that the guy who was founder of these courses passed away on June 2014 . in a car accident! but he is alive with his videos!!! RIP !! :(

saikumar
Автор

If anyone is having confusion between depth and height, think of the analogy that we measure the 'depth' of sea from it's surface and the 'height' of a person from toe to head.

PS: This was taken from a stackoverflow thread.

eshaan_
Автор

I click on every ads that you show because you are teaching me well and it is my duty to give some money from ads to you. Thanks mycodeschool.

yashchandraverma
Автор

Thanks for your hardwork...you did awesome job that benefit many students like me...Thumbs up and keep on sharing.

learningisjoy
Автор

This is an awesome series - even 7 years later!

nicolasgoosen
Автор

I cannot thank you enough for this playlist on Data Structures! Keep up the good work :)

TheTahlia
Автор

Here is the next video - Data structures: Binary Search Tree

mycodeschool
Автор

Best data structures tutorial around the web. Thanks for enlightening!

sourabhdattawad
Автор

Instead of thanking him on comment section. You could white list his channel on Ad-block ( if you are using one).

md-ayaz
Автор

Hands down best videos on the net for Data Structure. Awesome work man.

renon
Автор

Guys there also exists a different version
ACBT = Complete Binary Tree of mycodeschool
Complete BT = Perfect Binary Tree of mycodeschool

While Full/Strict/Proper and Perfect BT all are same.

gigachad
Автор

oh my god this was so helpful. i've read so much content about trees and watched so many videos that always left me even more confused. But THIS ... this was just perfect and extremely well explained. thank you so much for making this video.

RebeliousSapien
Автор

You are an amazing teacher thank you so much for helping me understand these topics more completely.

josedubois
Автор

Sir you are the best teacher I have seen on YouTube you teach in such a simple way 🙏

krishnasingh
Автор

tree can be implemented using arrays if tree is perfect binary tree not just complete .
and your are one of the best in cs topics on the entire internet, keep uppp

abdelrhmanahmed
Автор

at 13:04 I am confused how you say the height of left subtree is 1? I thought it was 2. Say node x is the one in red. I watched the previous vid and it says, the height of x is the number of edges in the longest path of x to a leaf. I counted 2?

I look at it this way to make it easier. 
if left subtree has no edge - height = 0
if right subtreee has no edge - height = 0
if left or right subtree has an edge, add up all the edges leading to the deepest leaf node then use your formula diff = | leftsubtree_height - rightsubtree_height |

TheOverAndAround
Автор

Excellent even after 5 years..Thank you

prakrutijani
Автор

for node2 at 12:51, you mentioned diff = |1-(-1) |
But Shouldn't it be |2-0| ? Left subtree has height 2 and right as 0... 0 because we still have node 2 and it's not empty node. The difference is 2 anyway.

chiranjeeveemohapatra
Автор

Its 2021 but still the best playlist on Tree DS on youtube

bishnudas
Автор

This is a masterpiece, thank you so much for the job that you're doing!

akumasdeception