Binary tree traversal: Preorder, Inorder, Postorder

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ม.ค. 2025

ความคิดเห็น • 392

  • @FabianLopez_lomba
    @FabianLopez_lomba 10 ปีที่แล้ว +438

    I've lost track of how many times this chanel has saved me. Great job!

  • @Tommy-yq6vr
    @Tommy-yq6vr 8 ปีที่แล้ว +544

    100 times more clearer than those overly complicated computer science books that look like a robot had written them.

  • @sarkarpiu1
    @sarkarpiu1 5 ปีที่แล้ว +30

    After studying it almost everywhere else around a million times, this video finally helped me understand the pre, post and inorder traversal of trees. Thank you so much for making it so easy to understand. I think every computer science student needs to watch this video.

  • @fsandovc
    @fsandovc 4 ปีที่แล้ว +7

    I have to say this is one of the most clearer explanation I have found on TH-cam, everyone explains the ROOT/LEFT/RIGHT and the code part. But the majority don't explain how the memory is managing the nodes data and how it returns it back. Thanks a lot!

  • @CSERISHINANDHA
    @CSERISHINANDHA 3 ปีที่แล้ว +44

    If you noticed, in every single video where he assumes some random addresses for nodes, the minimum difference between the address of any two nodes will not be lesser than 2x(number of bytes occupied by the node in a 64 byte operating system). Meaning, he always stays alert in what he's doing. Respect+💂

  • @youarethecssformyhtml
    @youarethecssformyhtml ปีที่แล้ว +5

    This channel is pure gold 🥇. Everything is just clear without someone showing off instead of teaching. 😀

  • @kevin-kuei
    @kevin-kuei 2 ปีที่แล้ว +4

    Just wanted to say I really appreciate these algorithm videos. Great explanations, diagraming, and delivery all around. Looking forward to exploring more of your content.

  • @adityaojha2701
    @adityaojha2701 4 ปีที่แล้ว +3

    Nothing can be better than these playlists.

  • @jacquelinelee9836
    @jacquelinelee9836 7 ปีที่แล้ว +5

    One of the most talented tutors I've ever seen on TH-cam!!!! You Rock!

  • @mudassirshahzadkk
    @mudassirshahzadkk 4 ปีที่แล้ว +2

    6 years old but still much better than other latest videos on this topic.

  • @hangchen6131
    @hangchen6131 7 ปีที่แล้ว +3

    Awesome walkthrough of the recursive function of the traversal of a binary tree in detail with a stack structure illustrated! I now fully understand the magic behind the code! Your videos are the best data structure tutorials I can find so far! Thanks :)

  • @wastingtime6211
    @wastingtime6211 5 ปีที่แล้ว +1

    Explained really well! Still helping someone 5 years after the video was made now that's quality this is timeless.

  • @fmacoful
    @fmacoful 8 ปีที่แล้ว +7

    You save my life from Christmas homework.
    You are the hero.
    You are hope of humankind!!!

  • @shefaliemmanuel7286
    @shefaliemmanuel7286 6 ปีที่แล้ว

    ½ way through a data structure and algorithms course- this channel is a LIFE SAVER

  • @MisterHorsey
    @MisterHorsey 4 หลายเดือนก่อน +1

    The call stack visualisation @ 9mins or thereabouts is a really nice way to illustrate how recursive calls are paused to allow the further recursive calls to complete. This has been the biggest issue I've had in trying to get fully comfortable with recursion as I'm forever trying to track them all in the head!

  • @erics4433
    @erics4433 8 ปีที่แล้ว +2

    This was very helpful. I was getting a bit confused on how exactly the recursive code was behaving in relation to the tree and your side by side approach really cleared it up for me. Great job, thank you!

  • @mehershrishtinigam5449
    @mehershrishtinigam5449 2 ปีที่แล้ว +1

    I will never forget any of the tree concepts now. Thank you.

  • @anjalidarokar2408
    @anjalidarokar2408 4 ปีที่แล้ว

    Sir, you have taught the concepts excellently- no one ever explained these things, the way you did.....!!!!! Thank you for all the pain that you took to come up with such informative videos.....!!!!!

  • @lukevassor
    @lukevassor 6 ปีที่แล้ว +2

    I think you just saved my M.Sc. exam. You sir are a legend, recursive thank yous with no cap.

  • @vjkumk
    @vjkumk 2 ปีที่แล้ว

    Finally able to understand the tree traversal in proper and easier way after looking at so many you tube videos!

  • @向前走五十五步
    @向前走五十五步 8 ปีที่แล้ว +1

    This is the most elegant explanation of preorder, inorder and postorder. Thank you so much!

  • @LATRIBUNEVLV
    @LATRIBUNEVLV 2 ปีที่แล้ว +1

    Your work is more clear and usefull to me while i try to get my degree than most of my classes and teachers, thx :)

  • @veritas7010
    @veritas7010 9 ปีที่แล้ว +32

    The most clear explanations of all youtube, thank you!

  • @armadonluvr
    @armadonluvr 7 ปีที่แล้ว +4

    Studying for my midterm, and this is one of the topics tomorrow. Can not thank you enough for a clear, concise, well drawn, and well thought out explanation. Thanks dude

  • @md-ayaz
    @md-ayaz 8 ปีที่แล้ว +11

    I owe you a lot brother. You should continue making videos.

  • @JackMarchetti29
    @JackMarchetti29 5 ปีที่แล้ว

    Probably the best explanation I've come across for traversing a binary tree. This was really great.

  • @markpascual100
    @markpascual100 4 ปีที่แล้ว

    by far the best explanation for tree traversal on youtube

  • @rbsupercool
    @rbsupercool 10 ปีที่แล้ว +6

    i was waiting for it..finally got it.. every day when i open youtube, first thing i do is check if you have uploaded new videos... thanks a lot.. :)

  • @divyanshpandit6509
    @divyanshpandit6509 3 ปีที่แล้ว

    this man is brilliant! just look at how well he explains these tricky topics in such an intuitive manner

  • @chiragjain1424
    @chiragjain1424 3 ปีที่แล้ว

    This playlist is still the best, even 6 7 years after it was uploaded

  • @shrutipulstya9
    @shrutipulstya9 4 ปีที่แล้ว

    thank you for not having any ads and great explanation .

  • @arvind617
    @arvind617 6 ปีที่แล้ว +1

    Wow...u explained the recursion process really well..way better than other videos on the same topic!!

  • @abhinavanand4129
    @abhinavanand4129 9 ปีที่แล้ว

    Yours videos are building up careers of so many people's across the world and I m one of them thanx a lot sir..

  • @shahilushah
    @shahilushah 8 ปีที่แล้ว

    Hands down the best channel to learn data structures!!

  • @parthaprateempatra4278
    @parthaprateempatra4278 4 ปีที่แล้ว

    This is a gem of a channel.

  • @natureauthor
    @natureauthor 9 ปีที่แล้ว +4

    Thank you so much! This video was very comprehensive and incredibly helpful. I love that you put so much thought and detail into explaining this concept.

  • @atonewiththedust
    @atonewiththedust 8 ปีที่แล้ว +2

    I think I've finally wrapped my head around recursion thanks to this video. Great explanation!

  • @cytriax8657
    @cytriax8657 8 ปีที่แล้ว

    I'm studying a Computer Science course in Uni, you clarified within the space of this video and many others what my lecture could not in 3 weeks in relation to data structures. Yay, I think I won't fail my unit now!!! #Hype

  • @GhanshyamDobariya90
    @GhanshyamDobariya90 4 ปีที่แล้ว

    I m front end developer... to learn tree I have seen many videos but this one I loved and felt more easy to understand....

  • @aleksey5315
    @aleksey5315 3 ปีที่แล้ว

    Greatest explanation of tree traversals I've ever seen! Thank you so much for making it so easy to understand!

  • @shivampatel8850
    @shivampatel8850 2 ปีที่แล้ว

    your visual explanation of recursion function is very influensing and good

  • @MohitK96
    @MohitK96 7 ปีที่แล้ว

    Whenever I forget traversals, this channel always helps :)

  • @27priancygahlot
    @27priancygahlot 7 ปีที่แล้ว +1

    Beautiful explanation.I was stuck for many days in BST.Thanks for saving me out .Great Job guys.Kudos!!

  • @husseinbakiri5320
    @husseinbakiri5320 8 ปีที่แล้ว

    really fruitful.i usually learn through these videos before i teach my students.brief and clear.thank u sir.

  • @dembashow
    @dembashow 4 ปีที่แล้ว

    this man is really great I don't know why his videos are not number1 trending on youtube

  • @iamrajagrawal
    @iamrajagrawal 7 ปีที่แล้ว +2

    You explained so nicely that even a 5th standard student can easily understand this...Thank you so much!

  • @brendanmuscutt5001
    @brendanmuscutt5001 7 ปีที่แล้ว

    Thanks a lot. I am from Germany but I prefer your videos to any other in my language. You are really talented in expaining

  • @meitantei69
    @meitantei69 4 ปีที่แล้ว

    I have no idea how much I owe you, thank you for all your videos

  • @vivian_who
    @vivian_who 8 ปีที่แล้ว +4

    This is my favorite subject in university, because of you!

  • @ORagnar
    @ORagnar 4 ปีที่แล้ว

    This guy is an exceptionally good teacher.

  • @altondsouza2311
    @altondsouza2311 6 ปีที่แล้ว

    Great work! The explanation was thorough. I actually found it difficult understanding it from the book data structures using C, but then referred to this video which saved my time.

  • @monicaslv323
    @monicaslv323 9 ปีที่แล้ว

    Recursive is such a complex thing to understand...but you helped a lot. Thanks so much.

  • @paz1359
    @paz1359 10 ปีที่แล้ว +3

    after 5 years, I found a tutorial who put me out my misery . thank you so much

  • @krshah2008
    @krshah2008 7 ปีที่แล้ว

    You're awesome. I was having so much confusion about recursive function, but your video cleared the entire concept. Thank you very much

  • @varunVyas
    @varunVyas 10 ปีที่แล้ว

    Thanks a million. videos are precise, consistent teaching method, correctly paced, appropriately supplemented with code/pseudocode, concise. Please do some videos on DP and other algorithms that are asked in competitive contests.string matching, graphs etc. Thanks again man.

  • @sohinichaudhuri518
    @sohinichaudhuri518 4 ปีที่แล้ว

    You are missed by all of us ... pls come soon ... u are the legend ...

  • @johncenakiwi
    @johncenakiwi 3 ปีที่แล้ว

    This video is actually the best video for understanding recursion.

  • @rd-cu1vo
    @rd-cu1vo 8 ปีที่แล้ว +3

    i was a lot confused about the recursion but it made everything clear. thanks a lot!!

  • @danimanabat5791
    @danimanabat5791 4 ปีที่แล้ว

    Holy shit dude this is a miraculous youtube channel that saves me in my DSA subject. Thanks a ton!

  • @colesiegel1922
    @colesiegel1922 5 ปีที่แล้ว

    Fantastic video the visualisations helped so much, looked through many websites and books before I found your vid which clarified everything including time complexity in 15 minutes.

  • @santiagobenitezperez5240
    @santiagobenitezperez5240 2 ปีที่แล้ว

    man, amazing visualization, i couldnt understand but this video was what i needed

  • @mahmoudtawfiq6219
    @mahmoudtawfiq6219 3 หลายเดือนก่อน

    why is the GOAT not uploading anymore?

  • @JD-po3uk
    @JD-po3uk 6 ปีที่แล้ว

    the most thorough video i have seen

  • @sammyj29
    @sammyj29 2 ปีที่แล้ว

    I have always struggled with recursion but this was such a beautiful explanation! Thank you for making these videos!!

  • @shubhsharma19
    @shubhsharma19 6 หลายเดือนก่อน

    one of the cleanest explanation ever

  • @priyankjain4082
    @priyankjain4082 9 ปีที่แล้ว

    A crisp and concise explanation! Stuff that clears every doubt just in the first view!

  • @bsrafael
    @bsrafael 6 ปีที่แล้ว +1

    This video is just GREAT. Clear and with all the important concepts about the traversal. Thank you very much for this awesome piece of information :D

  • @jalavadinaveen7824
    @jalavadinaveen7824 4 ปีที่แล้ว

    Wow superb explanation broo really awesome I searched soo many videos for those steps but I didn't understand after watching your video only I cleared understand really awesome explaination broo

  • @bvwalker1
    @bvwalker1 7 ปีที่แล้ว +3

    Nice presentation! Just an FYI, you have the Inorder output listed incorrectly (around 12:35 mark). You added an "H" by mistake making 11 pieces of data instead of 10.

  • @sumitkr.3758
    @sumitkr.3758 4 ปีที่แล้ว

    Best collection of lectures for data structure... Thanks a lot👌

  • @joedunder4439
    @joedunder4439 2 ปีที่แล้ว +1

    This is so gloriously helpful. Thank you!

  • @dharmendrakumarpandey600
    @dharmendrakumarpandey600 10 ปีที่แล้ว

    Just one thing i want to say you.... A BIG BIG BIG THANK U.
    I got confidense in DS only after learning through #mycodeschool

  • @at.8887
    @at.8887 8 ปีที่แล้ว

    You are amazing, you speak so clearly and explain it very simply while my teacher is able to put us to sleep the minute we start listening.
    GREAT JOB
    p.s: could you please upload videos about ADT and also combining it with structures, trees and such? having also an example including the whole three: Header.h, Implementatiom.c and Main.c and how to build and work with them

  • @yukeshyukesh9572
    @yukeshyukesh9572 4 ปีที่แล้ว +1

    The worst part is I'm paying my clg for nothing and Im learning from the best teacher for free!!

  • @rohitdoestech
    @rohitdoestech 5 ปีที่แล้ว +7

    Still a useful and brilliant video in 2019

  • @MidnightBehBeh
    @MidnightBehBeh 6 ปีที่แล้ว

    Complicated concepts taught simple. OMGGGGGGG I LOVE U!!! SO MUCH THANKS. Couldn't visualize how the recursion works, but after this my mind is clear. Truly wonderful teacher. im subscribing!!!! Hope you continue to teach us more stuff! =D

  • @ReneeSLiu-zx5tj
    @ReneeSLiu-zx5tj 5 ปีที่แล้ว

    This might be the one video that brings me out of the abyss of recursion :) THANKS!

  • @sufian9951
    @sufian9951 5 ปีที่แล้ว

    very easy to understand. respect from BANGLADESH .

  • @srisubhashpathuri3909
    @srisubhashpathuri3909 4 ปีที่แล้ว

    Great video. I thank this channel for nicely explaining the video as it bridged the gaps in my professors explanation

  • @wokguysrandomstuff5535
    @wokguysrandomstuff5535 3 ปีที่แล้ว

    Holy sh*t, finally got my mind clear, the f**king recursions are too hard to see, couldn`t understand how the traversals works, Thank you so much!

  • @sovanmondal2621
    @sovanmondal2621 6 ปีที่แล้ว +1

    Best Explanation than all other,.....clean and simple.........thank you..

  • @sakshidevi353
    @sakshidevi353 3 ปีที่แล้ว +1

    really this video has cleared my all concepts...thanks a lot sir

  • @xindiwang232
    @xindiwang232 9 ปีที่แล้ว

    Hey many thx!!! Actually I found this video the most brilliant one explaining the recursion on the BST. You've saved my day!!! Quite inspired!!! Thanks again for sharing!!!!!!!!

  • @sblasiol
    @sblasiol 7 ปีที่แล้ว

    This is an excellent visualization of these principals.

  • @JuniorMoreiraC
    @JuniorMoreiraC 7 ปีที่แล้ว

    Very good lesson! It's really clear the way that you explains and your english it's good too that helps a lot!! Thank you!

  • @fundiaries__1939
    @fundiaries__1939 4 ปีที่แล้ว

    Amazing explanation... best explanation I got till now.. thanks alot... plz make videos on dynamic programming also

  • @rishabhsahu5257
    @rishabhsahu5257 5 ปีที่แล้ว

    Awesome video with full in depth explanation with practical examples

  • @mohitvarma1012
    @mohitvarma1012 4 ปีที่แล้ว +1

    Thanx a lot for all of ur videos !! u really made all this so simple to understand with u r explanation!!!

  • @pato6350
    @pato6350 4 ปีที่แล้ว

    I just finally understood inorder and postorder, thank you so much!

  • @shaileshpachbhai432
    @shaileshpachbhai432 8 ปีที่แล้ว +3

    This is very good explanation in simple in lucid language. Great Job :)

  • @connerjensen8170
    @connerjensen8170 5 ปีที่แล้ว

    Amazing video! You explain with such clarity and simplicity. Thank you.

  • @AnilGupta-iv1rz
    @AnilGupta-iv1rz 6 ปีที่แล้ว +1

    I would love to see your videos on advanced data structure topic like adjoint set,trie and AVL tree.

  • @baryal6803
    @baryal6803 ปีที่แล้ว

    life saver, level of teaching🥰

  • @ThuyNguyen-bu9ge
    @ThuyNguyen-bu9ge 10 ปีที่แล้ว +137

    I think you made a mistake with In order, there is no H in the binary tree, yet there is one in your list.

    • @mycodeschool
      @mycodeschool  10 ปีที่แล้ว +39

      Yeah, That's a mistake. :( I think I have put an annotation to mark the error.

    • @vanjavk
      @vanjavk 9 ปีที่แล้ว +1

      +Tiffastic Nguyen yeah noticed it too :D

    • @MohitK96
      @MohitK96 7 ปีที่แล้ว

      +Thuy Nguyen You tried that's why you noticed, it's essential to keep track of every step during recursion in order to learn it.

    • @venkateshrayala2440
      @venkateshrayala2440 6 ปีที่แล้ว

      I figured that

    • @comradepeter87
      @comradepeter87 5 ปีที่แล้ว

      Output: ThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksThanksUU]\($^^^!*@{;,

  • @saravanaganesh8826
    @saravanaganesh8826 4 ปีที่แล้ว

    Crystal clear explanation... Great job

  • @dangjustintime
    @dangjustintime 7 ปีที่แล้ว

    You explained it way better than my professor

  • @mridhulml3269
    @mridhulml3269 2 หลายเดือนก่อน

    All of this was taken in college. Yet I understood nothing. Your videos help me understand where it all fits together in the bigger picture! Like WHY am I learning tree traversals.
    I don't think the teachers themselves understood it fully either..we were all busy byhearting stupid proofs without understanding nothing!

  • @CSERISHINANDHA
    @CSERISHINANDHA 3 ปีที่แล้ว +1

    I don't know if any of you noticed it, at 13:08 , the node for letter 'H' is missing but he wrote it in the result

  • @utkarshjaiswal7224
    @utkarshjaiswal7224 3 ปีที่แล้ว

    best explanation till date

  • @Lollipop69420
    @Lollipop69420 7 ปีที่แล้ว

    🙏🙏🙏🙏no words awesome channel no tutorial at local place can't teach better than this pleas go on continuing sir.and btw try to upload videos of java oops concept.