Binary tree traversal - breadth-first and depth-first strategies

  Рет қаралды 811,423

mycodeschool

mycodeschool

Күн бұрын

Пікірлер: 194
@yokeejr5092
@yokeejr5092 Ай бұрын
10 years later and there is no other video that explains this topic as intuitively as this guy did..Kudoss to thiss guy💪🔥
@ahrik-7
@ahrik-7 6 жыл бұрын
Dude, you're like one of the few people I'd comment on.. your work is amazing. You've brought insane amount of clarity to each concept.
@JangBahadur3028
@JangBahadur3028 2 жыл бұрын
He is dead... man. In road accident.
@alextech4881
@alextech4881 2 жыл бұрын
@@JangBahadur3028 the speaker is not dead, but sadly his mate is. Rest in peace!
@hornyjesuz
@hornyjesuz Жыл бұрын
​@@JangBahadur3028really? Loss is incomparable 😭
@LearnwithChampzz-rv4lk
@LearnwithChampzz-rv4lk 5 ай бұрын
Life is full of circles!! Few years ago in 2020, I was watching your video to get my first job in college placement and now here i am again!!
@dhillaz
@dhillaz 7 ай бұрын
Excellent lesson. Related Leetcode exercises: 144 - Binary Tree Preorder Traversal 102 - Binary Tree Level Order Traversal
@yosuanicolaus
@yosuanicolaus 2 жыл бұрын
Thank you very much for your explanation on DFS! Understanding about DLR, LDR, LRD really just makes everything 100x simpler.
@altechy7304
@altechy7304 3 жыл бұрын
There are people who teach, because they hold a degree, and that degree allows them to do what ever they want. And there are people who have actually the skill of teaching a special subject. Few Universities in the US have skilled teachers... Thank you so much for sharing your expertise with the world!
@MhZnSO4
@MhZnSO4 8 жыл бұрын
The level of clarity in concepts i gain after your watching videos is PHENOMENAL! Keep up the good work. Open up some portal where willing people like me can give some money to your efforts.
@711tornado
@711tornado 6 жыл бұрын
I agree. Often it's hard to find people who teach things in such a precise and clear manner. I remember when I first started programming in C from Java, the concept of pointers absolutely threw me through a loop and the common explanation of "It's just like a reference in Java!" didn't cut it, mcodeschool's lesson on pointers had excellent examples and helped grasp the concept perfectly!
@Ankit-mq6em
@Ankit-mq6em 6 жыл бұрын
Animesh Nayan sir you are great and can be leader in whole india if you open your online courses as well as offline institute sir .You will rock and beat all others easily
@amanrai8010
@amanrai8010 5 жыл бұрын
@rocky rawlo Bro he is alive his cofounder Harsh Surnyan is no more
@cripplingdepression8889
@cripplingdepression8889 6 жыл бұрын
These videos are way clearer than my engineering school's courses THANK YOU SO MUCH MAN YOU'RE THE BEST
@gauzammalhotra
@gauzammalhotra 5 жыл бұрын
what a name lmao
@ribaker822
@ribaker822 7 жыл бұрын
You have got unusual clarity and insight into the concepts you teach. People like you are a breath of fresh air in CS. Thank you for deciding and taking time to do these series!
@mohbob
@mohbob 10 жыл бұрын
Honestly believe your teaching standard is THE best I've come across !! I'm from london UK but currently wishing I was in India just so I can study in your boot camp !
@mycodeschool
@mycodeschool 10 жыл бұрын
Mohbob Ali Thanks a lot :)
@lakshminarasimhanb
@lakshminarasimhanb 6 жыл бұрын
Your preorder inorder postorder explanation is fantastic that cleared my intrinsic confusion.
@nickorefice7323
@nickorefice7323 7 жыл бұрын
Thanks for the upload! The coloring of nodes during traversal really helped with my comprehesion
@camillesatoshi8393
@camillesatoshi8393 Жыл бұрын
Hahaha, I have never seen an explanation so clear, step-by-step. There is no space for doubts in between. It's a piece of "for dummies" mastery. Thanks
@joeybing3476
@joeybing3476 9 жыл бұрын
best set of tutorials I've came across. outstanding!
@pranavshukla7188
@pranavshukla7188 4 жыл бұрын
One of the best explanations I have ever seen on KZbin.
@addadd8784
@addadd8784 4 ай бұрын
thank you. easy to follow and great visuals. 10 years on and this is still great.
@akhilgupta3664
@akhilgupta3664 4 жыл бұрын
The concepts after watching these videos are reached at hight level. After watching your videos , I feel confidence in that particular topic. Thanks Sir !!
@chandumudiraj2582
@chandumudiraj2582 2 жыл бұрын
After watching this video I thought this is a one of the best channel I recommend for learning data structure easily... Thanks a lot for the explanation
@NeeliMegha024
@NeeliMegha024 7 жыл бұрын
I am watching your video's from couple of days and i haven't watched anything better than this. You are really helping people to understand real concepts. No noise. Gr8!. Please continue and help people.
@mashable8759
@mashable8759 8 жыл бұрын
Please i recommend everybody to see all his lectures. THey are better than any college teacher :o THANK YOU So MUCH SIRRRRR
@snigdhasingh533
@snigdhasingh533 4 жыл бұрын
The best explanation across the internet
@sa25078
@sa25078 3 жыл бұрын
Ita still relatable even now .Thanks for such an amazing explaination😀
@rbsupercool
@rbsupercool 10 жыл бұрын
who the heck dislikes this videos... these are the best..
@sravansainath7980
@sravansainath7980 2 жыл бұрын
I was in 6th class when this video was uploaded ,now i am in my 3rd year b.tech
@tanminator_
@tanminator_ 9 жыл бұрын
You guys just keep saving me time after time!!!! Great work. :)
@amansinghbhadauria2818
@amansinghbhadauria2818 5 жыл бұрын
Why did you stopped making videos? We need a hero like you to understand these concepts clearly.
@0x1h0b
@0x1h0b 3 жыл бұрын
It's a very sad story actually, i found out while reading one of his interviews on why he stopped making videos.........initially they were 2 friends who started making videos and unfortunately one of them passed away, he had an accident or something... after that videos very less frequent and eventually he stopped making videos ..now he focuses more on his family and full time job....that's all i know
@aryanverma7800
@aryanverma7800 3 жыл бұрын
Agree its difficult to manage youtube.....but still you can do a live stream to chat with your students.....and share feelings with us....that would be great
@Mari22R
@Mari22R 7 жыл бұрын
You are the best professor ever! Thank you so much for posting videos
@tsunningwah3471
@tsunningwah3471 Жыл бұрын
is
@pramodkumargupta6269
@pramodkumargupta6269 8 жыл бұрын
You guys are doing great job!! keep it up, your explanations is far better than any book or lectures, concise and simple !!
@ankitajain4194
@ankitajain4194 9 жыл бұрын
Best tree traversal explanation.
@ajinkya90swim
@ajinkya90swim 10 жыл бұрын
I love this guy!!! very clear and systematic approach.
@IRLVaporwave
@IRLVaporwave 3 жыл бұрын
OMG I FINALLY GET HOW TRAVERSAL WORKS. THANK YOU!!!!
@alexdesouza140
@alexdesouza140 9 жыл бұрын
Outstanding explanation like all of your other videos.. thanks for your hard work !!!
@javayriyab4001
@javayriyab4001 Жыл бұрын
you explain it so well, thank you :)
@jay_ndimande
@jay_ndimande 2 жыл бұрын
this has to be the best explanation. 🥺
@batemanyorayamba4441
@batemanyorayamba4441 4 жыл бұрын
As in.. This explanation is superb and uncomplicated like those the school lecturer gave
@ChauNguyen-nb5so
@ChauNguyen-nb5so 5 жыл бұрын
Your videos are so helpful with all the concepts in my Data Structure class. Thank you so much
@bayazidtamim7654
@bayazidtamim7654 6 жыл бұрын
your this video helped my exam preparation
@nesliemmanunday3682
@nesliemmanunday3682 Жыл бұрын
I was here from TOP.
@salthesadmanshark5645
@salthesadmanshark5645 3 жыл бұрын
this was a very well made video, concise and well explained. Thumbs up .
@saanviahuja1
@saanviahuja1 Жыл бұрын
This was just wow 🙏 Very clear explanation
@adamrizk6735
@adamrizk6735 Жыл бұрын
Awesome video, thanks for uploading this
@kartikxramesh
@kartikxramesh 5 жыл бұрын
Can someone please explain why Inorder traversal of a binary search tree gives a sorted list? at 11:27 the list has the order G H I. now I is definitely greater than G. but both G and H are smaller than I, so how come G is before H necessarily? It could be reverse also?
@MrWhiteMischief
@MrWhiteMischief 8 жыл бұрын
Whats your name buddy? ..your videos are the best I have ever seen.. the way you explain and use diff colors and how overall video is made.. great work.. thanks a ton!
@AnitBasuThakur
@AnitBasuThakur 8 жыл бұрын
+Harsh Saha Animesh Nayan.
@brandonklein1
@brandonklein1 5 жыл бұрын
Really fantastic clarity! Thank you so much!
@NqobileSayi
@NqobileSayi Жыл бұрын
Very understandable... Thank you
@metarun
@metarun 3 жыл бұрын
Inorder traversal only gives the sorted list if the tree is Binary Search Tree, a very important thing to remember.,
@yeah3722
@yeah3722 Жыл бұрын
This video was amazing, well done!
@punstress
@punstress 4 жыл бұрын
Excellent visualization but why didn't you post the link to the next one?
@fisslewine1222
@fisslewine1222 7 жыл бұрын
Great tutorial, do you have anything for node deletion?
@wandererstraining
@wandererstraining 2 жыл бұрын
Well, that's one more of your videos that makes it to my favorites... Again. 😁
@deikan416
@deikan416 10 жыл бұрын
excellent video, i really appreciate your method of explanation.
@quantum_yt4790
@quantum_yt4790 10 ай бұрын
nice explanation
@ImranAliyev
@ImranAliyev 4 жыл бұрын
Excellent explanation!
@rudiboshoff8201
@rudiboshoff8201 5 жыл бұрын
Amazingly clear video, Thank you!
@nandatkumar
@nandatkumar 8 жыл бұрын
Hi, Thanks for the explanation. Its very great explantion... thanks again
@folksgames7047
@folksgames7047 8 жыл бұрын
Very helpful, thank you!
@sathishs5840
@sathishs5840 4 жыл бұрын
post order traversal of the tree should be A,C,B,E,D,H,I,G,K,J . at 11.49 last two node is reversed.
@terryparrish6763
@terryparrish6763 9 жыл бұрын
Very good example!!! I really was able to follow. Thanks!!!!
@nabilmuthanna6083
@nabilmuthanna6083 10 жыл бұрын
first of all,I have been watching your videos and they are really helpful thank u for that. I just have question so for traversing the tree in depth-first or breadth-first , the time complexity is O(n) because I have to visit every node on the tree what about the space complexity for depth-first and breadth-first..? thanks in advance.
@mycodeschool
@mycodeschool 10 жыл бұрын
nabil muthanna : space complexity will be O(n) in worst case and O(log n) in average case for depth-first. For Breadth-first , space complexity will be O(n) in average case. So, depth first is efficient in terms of memory consumption. I'll explain space complexity analysis in detail in coming. lessons.
@nbotelho10
@nbotelho10 8 жыл бұрын
Very nicely explained, thank you!
@DenisBTV
@DenisBTV 7 жыл бұрын
Awesome explanation!
@christiangarmay4667
@christiangarmay4667 5 жыл бұрын
Thank you. I can answer my exam tomorrow.
@usama57926
@usama57926 6 жыл бұрын
amazing algorithms
@KnightVsMinecraft
@KnightVsMinecraft 8 жыл бұрын
Thanks :) very helpful
@Sam-oc7nm
@Sam-oc7nm 9 жыл бұрын
Man, you are the best!!!!!! thank you so much!
@demigod6190
@demigod6190 4 жыл бұрын
you just broke the concept men!
@AjinkyaKapseiajinkya
@AjinkyaKapseiajinkya 8 жыл бұрын
thank you so much..which software did u used for this tutorial..?
@ManishKumar-qx1kh
@ManishKumar-qx1kh 7 жыл бұрын
Sir can you upload videos on heap tree please.
@markliu22
@markliu22 4 жыл бұрын
thank you, very helpful dood
@ANKITKUMARapple
@ANKITKUMARapple 7 жыл бұрын
Thanks a lot sir! for making such an awesome video. Clarity of Concept->Excellent Sir,I have a doubt can u please tell me tree programmings are more efficient in C/C++/Java. I have followed all of your lectures.
@ForcedPositivityMalayalam
@ForcedPositivityMalayalam 3 жыл бұрын
I know I'm like 7 years late to the party, but for anyone who can't remember preorder, postorder and inorder, think of it like this: The convention is always to read Left child before Right child. Preorder: Root is "pre"-read to Left and Right. Pre meaning before. That is, root > left > right. Inorder: Root is "in (between)" Left and Right. That is, left > root > right. Postorder: Root is read "post" Left and Right. Post meaning after. So, that would be, left > right > root. Hope it helps some random stranger. And btw, I'll give the credit for this "mnemonic" to Jenny from Jenny's Lectures. I watch both her and mycodeschool's videos to get a good understanding of the concept and the algorithm.
@riazlatib
@riazlatib 9 жыл бұрын
Thank you for your help!
@arush2323
@arush2323 10 жыл бұрын
sir, we all are waiting for your up comming videos...please be quicker.. :D and BDW I just love the way you teach...keep these amazing videos comming...
@jaxongirrahimov7908
@jaxongirrahimov7908 4 жыл бұрын
superb as Feynman
@AhmadAwais
@AhmadAwais 9 жыл бұрын
Awesome! How do you record these videos? What are you using to write and highlighting and stuff? Looking forward.
@R9000S
@R9000S 9 жыл бұрын
+Ahmad Awais just checked out ur cool website. and dang u have a lot of twitter followers
@ordinarycoder8090
@ordinarycoder8090 9 жыл бұрын
great explanation
@deveren
@deveren 8 ай бұрын
from odin!
@noice1006
@noice1006 4 ай бұрын
Same
@deveren
@deveren 4 ай бұрын
@@noice1006 wish ya luck keep it up
@harithabandara3212
@harithabandara3212 8 ай бұрын
Thank you very much!♥
@mikemassoom
@mikemassoom 9 жыл бұрын
Outstanding!!! Thank you
@iwayanbagus2271
@iwayanbagus2271 6 жыл бұрын
I tried to figure out the value in Postorder traversal, mine is A,C,B,E,D,H,I,G,K,J,F. CMIIW
@divyanshsharma7406
@divyanshsharma7406 5 жыл бұрын
kindly provide the video transcript of your lectures as provided by coursera
@ElTexMexAlex
@ElTexMexAlex 7 жыл бұрын
You taught better than my teacher.
@kausachan4167
@kausachan4167 4 жыл бұрын
is that me doing data structures so well !!!
@koustavannu
@koustavannu 10 жыл бұрын
just luvd it. teaching style z just awesome. very much helpful...!!!!
@prabh557
@prabh557 7 жыл бұрын
*Sir u should write a leacture number..it will be helpful*
@Confusedalien1133
@Confusedalien1133 7 жыл бұрын
Lol this channel died because his friend died and now he is back to working at microsoft sad!
@ArkamitDutta
@ArkamitDutta 9 жыл бұрын
Is it possible to do inorder or postorder traversals in BFS?
@krishnakandula6587
@krishnakandula6587 4 жыл бұрын
Woderful ! Thank you.
@bbs-3358
@bbs-3358 4 жыл бұрын
so the Post Order in the video is correct?. And inorder - how come is G, H, I? why is it not H, I , G , J, K? ** can someone explain to me :(
@sathishs5840
@sathishs5840 4 жыл бұрын
try to visualize the each node and left subtree and right sub tree and solve each sub tree with the order
@Historyiswatching
@Historyiswatching 2 жыл бұрын
Is preorder, inorder, postorder only applicable to DFS? I'm confused by the wording from your video. Do we not use those 3 orders for BFS? Thank you
@Iam_inevitabIe
@Iam_inevitabIe 2 жыл бұрын
Yes, in BFS there is no preorder, inorder and postorder because we just traverse from left to right in each level until the tree is done
@viktorull
@viktorull 5 жыл бұрын
And when it have cycle (be a binary or any kind of tree, for example in that Arad to Bucharest map example) how the breadth-first and depth-first search behave?? could i put the repeated leaf node again? Thanks!!
@MaminaZvezdochka
@MaminaZvezdochka 3 жыл бұрын
Thanks so much for it! 🔥
@raiyanhossain691
@raiyanhossain691 4 жыл бұрын
Thank you sir.
@ArifA
@ArifA 9 жыл бұрын
If the height of left sub-tree and right-tree are same, then what would be the return value from max function?
@anirvansen2941
@anirvansen2941 4 жыл бұрын
Great Stuff!
@raffy3304
@raffy3304 10 жыл бұрын
Please make a vid tut on how to draw tree from pre,in and post traversals? thanks
@garywhite8274
@garywhite8274 10 жыл бұрын
You mentioned a word starting with "c" several times in the 1:50-2:10 time frame and I cannot understand what you're saying. It sounds like "craft" and that's how it's being interpreted by the auto closed captioning. What is this word? Thanks.
@garywhite8274
@garywhite8274 10 жыл бұрын
Are you saying "graph"?
@mycodeschool
@mycodeschool 10 жыл бұрын
Gary White Yeah, I am saying "Graph". May be I need to upload subtitle for this one. And I think "graph" would be pronounced properly moving on. :)
@garywhite8274
@garywhite8274 10 жыл бұрын
mycodeschool Thank you
@aryanverma7800
@aryanverma7800 3 жыл бұрын
@@mycodeschool when are you posting videos back on youtube
@hemantyadav1047
@hemantyadav1047 11 ай бұрын
The only way to understand anything is to do it recursively. Just like dfs
@dariogpb
@dariogpb 4 жыл бұрын
great video thank u
@aryansathish
@aryansathish 2 жыл бұрын
Thank you
Binary tree: Level Order Traversal
11:23
mycodeschool
Рет қаралды 612 М.
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 94 МЛН
1, 2, 3, 4, 5, 6, 7, 8, 9 🙈⚽️
00:46
Celine Dept
Рет қаралды 111 МЛН
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 8 МЛН
Binary tree traversal: Preorder, Inorder, Postorder
14:29
mycodeschool
Рет қаралды 963 М.
Intro to Binary Trees and Breadth First Traversal
21:40
Coderbyte
Рет қаралды 24 М.
Check if a binary tree is binary search tree or not
16:30
mycodeschool
Рет қаралды 380 М.
Binary Tree Algorithms for Technical Interviews - Full Course
1:48:53
freeCodeCamp.org
Рет қаралды 733 М.
Breadth First Search (BFS): Visualized and Explained
10:41
Reducible
Рет қаралды 220 М.
Data structures: Introduction to Trees
15:50
mycodeschool
Рет қаралды 1,5 МЛН