Tree (General Tree) - Data Structures & Algorithms Tutorials In Python #9

preview_player
Показать описание
Tree data structure is used to represent hierarchical data such as organization hierachy, product categories, geographic locations etc. In this video, we will go over general tree data structure. We will cover binary trees in another tutorial. We will implement tree in python and build a tree of electronic item categories.

Topics
00:00 introduction
00:26 What is tree data structure
03:47 Tree implementation in python
21:54 Exercise

#tree #pythontree #treedatastructure #datastructures #algorithms #python

#️⃣ Social Media #️⃣
Рекомендации по теме
Комментарии
Автор

Ok, this video is two years old, and you've moved on to a lot of other things. But I just want to point out - because I've searched - while there are plenty of so-called tutorials about binary trees, there is almost nothing about general trees. I get it, people always want to take the easiest option, even if that doesn't really help their followers in the long run - or the short run, for that matter, because they quickly find out that too simplistic tutorials don't get you very far in the real world. So this is an appreciation, and a thank you, for the thoroughness and completeness of your work, and your interest in actually helping people learn what they need to know.

malikrumi
Автор

The best thing about your videos is that you provide a real world example for every data structure that we are going to discuss.

sukurcf
Автор

sir, I had my computer teachers in my college . But you are the one who actually taught me the Data Structure concepts and made me think why they were important and why we need to do know it . Some teachers sometimes dont know, how critical their roles are in some one life . Happy Teachers day to you even though today is not the teacher's day

souvikmitra
Автор

Watching this is 2021 for my Software Engineering's degree and man you are awesome ! Thank you for this awesome video !

MilahnMartin
Автор

I came to this video after not understanding Udacity’s explanation of it. You’ve done a fantastically better job at explaining this. Thank you !

ludviklamb
Автор

genuinely one of the most helpful tutorial series on this website! thank you!

d
Автор

I compiled the code without maintaining parent link it worked fine for traversing from root to leaf node

carzycults
Автор

I recently completed my MS in engineering in US. Have been learning python specifically to enhance my ML skills. Your videos have been really helpful. Appreciate your efforts.

justbewithme
Автор

Really helpful for for every person because I college level every teacher they teach only the theory concept but you can clear the concept real life examples In Linux file system is like this model.before seen this video I am not understanding where we can use the tree concept in real life.but know I am understanding very clearly.please upload these kind of real life data structure concept.❣️

ece-b--thamaraiselvansp
Автор

For printing levels, I found a much better and easy implementation. Hope this helps!

def printTree(self, level=0):
indent = " " * level
if level==0:
print(self.data)
else:
print(indent +"|__"+ self.data)
if self.children:
for child in self.children:
child.printTree(level + 1)

anuvind_m
Автор

Thank you
#codebasics, I wasn't understanding Tree implementation in python until I got this tutorial. Thank you

simpletermsexplained
Автор

Thank you for the playlist ❤❤❤
For Q.1, I found it difficult to solve the logic....
For Q.2) It was pretty simple
Using this playlist for my GATE preparation 💪💪💪

studyonly
Автор

Bro this is awesome! Your DS & Algo tutorials are so easy to understand and they also cover the fundamentals very well. Thanks so much for doing this :D

narinpratap
Автор

Thanks for a such simple and short explanation all information was to the point.

sanjeevKumar-eghp
Автор

We are waiting for your data structure continuation series...please post asap so we make use of this quarantine time.Also request a solved example per ds model.
Thanks

Mohamed-hmjo
Автор

This tutorial was a bit tricky but I managed to learn this and I did the exercises correctly without looking the solution. Thanks a lot

muhammedrajab
Автор

Really very happy about finding such an obvious and understood funny video series about data structures and algorithms. Everything is 100% clear with deeply explained theories and well-understood practicals. Also, the exercise series with the videos are highly appreciated. Dear sir thank you so much for the fantastic video series. ❤💖

tharindusathsara
Автор

your knowledge in oops concept is excellent ...

thisissharief
Автор

Thank you so much. This tutorial and excerise is the most helpful one for me to understand python class.

annlaosun
Автор

I often find that writing iteration-over functions in the same space as recursion-into functions can cause people a ton of issues with understanding. Instead, you could also write get_level() recursively like this:
def get_level():
if not self.parent:
return 0
else:
return self.parent.get_level() + 1

kacjugr