Simplest Binary Tree Traversal trick for preorder inorder postorder

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ส.ค. 2024
  • This video lecture shows the simplest way to traverse a binary tree in preorder inorder and postorder. This trick can be applied even without pen and paper and you can determine the traversal order in just a matter of seconds. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)

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

  • @techdose4u
    @techdose4u  10 หลายเดือนก่อน +5

    🟣 JOIN our 𝐋𝐈𝐕𝐄 𝐢𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰 𝐭𝐫𝐚𝐢𝐧𝐢𝐧𝐠 𝐩𝐫𝐨𝐠𝐫𝐚𝐦 through whatsapp query: +91 8918633037
    🔴 𝐂𝐡𝐞𝐜𝐤𝐨𝐮𝐭 𝐚𝐥𝐥 𝐨𝐮𝐫 𝐂𝐨𝐮𝐫𝐬𝐞𝐬: techdose.co.in/

    • @mehdisanjaghi292
      @mehdisanjaghi292 21 วันที่ผ่านมา

      Can the chart and algorithm be drawn for a large input data set?

  • @stephank.murphy4874
    @stephank.murphy4874 2 ปีที่แล้ว +827

    So in summary, always go from the root in counterclockwise direction around the tree.
    - For Pre-Order, print the nodes as you visit them for the first time.
    - For In-Order, print the nodes only when you visit them for the second time.
    - For Post-order, print the nodes when you visit them for the last time.
    Kudos man, that is succinct and sticks. Great job.

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

      Thank you!

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

      Thanks for saving my time.

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

      Thx 😊 🙏

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

      This may be even faster in exams then the traditional way. Nice

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

      Best CS tutoring video comment I have ever seen in my life. You are true god

  • @pieosaurus3
    @pieosaurus3 4 ปีที่แล้ว +594

    2 different professors have tried to teach me this and I did not understand it. This 7 minute video explained it better and WAY faster than them. Thank you so much!

    • @techdose4u
      @techdose4u  4 ปีที่แล้ว +15

      Welcome :)

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

      @@yutaitadori7318 relax brother

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

      ​@@techdose4uthank you for explaining. Albert Einstein once said if you can not explain something in simple terms, that means you have not understood the problem enough. You sir are clearly more knowledgeable than most profs

    • @nikolasioakimidis3003
      @nikolasioakimidis3003 11 หลายเดือนก่อน +1

      While yes, it's the fastest and easiest way, you don't really understand what's happening and why you are doing what you are doing. Don't get me wrong, this is an amazing video but every technique has its pros and cons

  • @RamprasadKaranth
    @RamprasadKaranth 3 ปีที่แล้ว +304

    You must be kidding ... You have successfully trolled all the professors out there .. This is a godsend !

    • @techdose4u
      @techdose4u  3 ปีที่แล้ว +12

      😂

    • @black_godfred
      @black_godfred 3 ปีที่แล้ว +17

      True. I said the same 😃 I have an exam in 4 hours time

    • @United_DNA
      @United_DNA 3 ปีที่แล้ว +2

      This is just theory dude!! The main part is how will you do this.

  • @sheikhaman6218
    @sheikhaman6218 3 ปีที่แล้ว +158

    You have converted my 50 min class into 7 min dope session man❤

  • @user-dn5pw1yw1h
    @user-dn5pw1yw1h 5 หลายเดือนก่อน +6

    These 7 minutes were the most productive 7 minutes i have ever spent on anything.

  • @BillboMC
    @BillboMC 3 ปีที่แล้ว +79

    The post order explanation was 🤯 GENIUS “has been reached for the third time” is the easiest logic ever

  • @nosiphokhumalo656
    @nosiphokhumalo656 3 ปีที่แล้ว +34

    I think this is the third time I'm watching the video, have wrote tests without fully understanding this but after today I got it a 100 percent, the post-order was well explained thank you so much

  • @ape8404
    @ape8404 4 ปีที่แล้ว +130

    Super logical explanations. In-order was especially confusing for me but your strategy makes it super easy, thank you!

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

      Welcome :)

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

      Tech Dose, he directly fully conveyed my feelings of gratitude. Thanks

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

      Remember Inorder as DFS

  • @awad2226
    @awad2226 2 ปีที่แล้ว +30

    12 hrs before exam and I couldn't even understand this concept well. Really inspiring and helpful. Thank you so much :)

    • @AceYT69
      @AceYT69 9 หลายเดือนก่อน +1

      13 hours for me rn

    • @samarthgupta3280
      @samarthgupta3280 2 หลายเดือนก่อน +1

      @@AceYT69 15 mins for me rn

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

      1hour 30 minutes left for me run

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

      3hours

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

    3 years ago and still helping tons of people, thanks for this amazing explanation dude, you seriously rock!
    I'm definitely sharing this with my Uni mates.

  • @siddharthsubramanian4687
    @siddharthsubramanian4687 3 ปีที่แล้ว +13

    This is strategy is so good. I don 't understand when just the concept is being taught, i only get the concept while explaining an example like this. TY.

  • @renasalp8695
    @renasalp8695 7 หลายเดือนก่อน +2

    There is no complicated things , everything is clear and basic . Literally amazing ❤thanks for it 🙏🏻🙏🏻

    • @techdose4u
      @techdose4u  7 หลายเดือนก่อน +2

      My pleasure 😊

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

    showing the null values under the leafs was really helpful and made me actually understand how each traversal algorithm was different, something my prof couldn't do, and in only 7 minutes! wow

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

    Truly the simplest and most intuitive way that I've seen this topic explained. You're a godsend.

  • @prajaktakadam4779
    @prajaktakadam4779 3 ปีที่แล้ว +2

    Excellent teacher I ever saw in my Life....You save life of students who learning DS but didn't understand anything.Your trick will helpful for my placement exam.

  • @MKYEuphoria
    @MKYEuphoria 2 ปีที่แล้ว +3

    Thank you for your simple straightforward approach. Took me so many videos to grasp these 3 traversals.

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

    Lmao, took dsa in my community college and now again at a 4 year just because its more rigorous at this school and I always come back to this video for traversals of binary trees, thanks for doing the lords work

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

      welcome :)

  • @boramawi
    @boramawi 4 หลายเดือนก่อน +3

    This is so simple! Yet most of the professors leave you confused after 3 hours of lecture!

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

    thank you so much for saving me hours of studying time. This guy is a genius.

  • @Batman72xxx
    @Batman72xxx 5 หลายเดือนก่อน +1

    This video is superb , especially for beginners !! I have been struggling with it so much and now I can just easily traverse a binary tree in just a few SECONDS

  • @Sory_Bâh
    @Sory_Bâh 8 หลายเดือนก่อน

    This is great man, I have spent 4 hours in class without understanding anything but just within 7 minutes I got everything very well!

  • @hetshah533
    @hetshah533 7 หลายเดือนก่อน +1

    Amazing method, you have converted 2 hrs lec in just 7 minutes!!!! thanks a lot sir :)))

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

    Been trying to understand these concepts for ages & failing to. This video helped me understand them easily. Thank you.

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

    Best CS tutoring video I have ever watched in my life.

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

    Thanks for this. The most natural and logical explanation one can get.

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

    This is fantastic, and I love how you explained the logic. Tyvm!

  • @a.rhythm9702
    @a.rhythm9702 3 ปีที่แล้ว +12

    I really loved your method of approaching the graphs. It really is simple & easy to learn.... Thanks a lot :)

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

    It's the most easy way to do it....great explanation ...Thanks alot sir 💞💞

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

    This is defiantly the best explanation I've seen so far.

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

    This is the best video i have ever seen in my life

  • @phantomifyy
    @phantomifyy 4 ปีที่แล้ว +12

    Thank you so much! This was so easy to understand, and with the pattern, it can solve any problem!

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

    wow, you explained it so clearly. My professor went over it so fast and made it sound so complicated. You were able to explain it faster than him!

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

    Literally ! I am speechless! This is good work and the score is 1 to ( You ) - 0 to
    ( My professor)

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

    Wow i wish you were my teacher for all my computer science modules you make things easy to understand.

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

      Wish I had the degree :)

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

    Oh god you saved my life....from 5hrs I am trying to figure it out....but u made it easy👍

  • @Haraqu8984
    @Haraqu8984 8 หลายเดือนก่อน

    You just cleared my concept in just 8 mins and for me it's crucial time because of having a quiz tommorrow of this topic hats off to you 👏

  • @Peter.H___
    @Peter.H___ 2 ปีที่แล้ว +1

    Thank you so much, because of you I'll end up passing my exam. This made what my lecturer was teaching seem so easy

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

    Thank you for this explanation, I finally understand now thanks to you. You are amazing at teaching.

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

    you are better than the most famous teachers

  • @WilliamCWayne
    @WilliamCWayne 10 หลายเดือนก่อน

    Thank you for this excellent visualization! Including the null child trees really made all the difference!

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

    I'VE NEVER UNDERSTOOD SOMETHING SO FAST

  • @HateNoobsGR
    @HateNoobsGR 2 ปีที่แล้ว +3

    Actually amazing. I was trying to figure it out by myself and when I though I got it i realised I did everything wrong xD Thanks for this amazing method, super easy!

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

    Best explanation I have seen so far. I'm ready for my final!

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

    90 min lecture explained in just 7 min.. Thank you

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

    Thank you very much for that video. I didn't understand that topic during the lectures at my university, but now it's easy for me :)

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

    the way my professor taught us about this was so hard but yours was so much easier thank u so much

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

    Watched many videos.this is the simplest one. Thank you so much

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

    Amazing video, was a perfect explanation for how the three traversals worked. Thank you!

  • @alevar46
    @alevar46 9 หลายเดือนก่อน +1

    I loved this video, very well explained. I wish my professor would explain things as easy as you do!. ❤

    • @techdose4u
      @techdose4u  9 หลายเดือนก่อน

      Thank you! 😃

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

    Best explanation I've seen. no ones mentioned on 1st, 2nd, 3rd reach. Clicked instantly

  • @ezanatadesa2485
    @ezanatadesa2485 13 วันที่ผ่านมา

    I can't believe this is free, Thank you very much bro

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

    You saved me in my exams 😪
    Thank you for keeping it very simple and short

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

    That 2nd and 3rd time explanation was rly good. Thx bud

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

    Thanks so much! Commenting for the youtube algorithm and to show support!

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

    Man you blew my mind 🤯🤯
    Is this always this easy or am I the one who's tripping??

  • @pinklegautam460
    @pinklegautam460 3 ปีที่แล้ว +2

    Dude😂 you the hero!!
    I was going to skip this topic!
    And now this is easiest topic so far🙂
    Idk why our clg teachers can't explain us with this simple trick instead of confusing us 😩

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

      😂 Great. Profs like to chill 😆

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

    Thank you so much sir for this amazing trick I had seen many lectured I didn't understand but when I saw this 7 minute video I know properly I am so glad sir having like u sir🥰❤🙏

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

    The best video of presenting the traversal, thank soooo much

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

    Finally I understood. Thank youu and greetings from Albania

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

    Amazing and mind-blowing trcik sir tqq so much for giving this lecture .no one said like you.we need a professor like you sir

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

    This was really good and your method makes it easy. well done

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

    Best video I've seen on this.
    Thanks for making it.

  • @joeman677
    @joeman677 9 หลายเดือนก่อน

    I feel many professors try to dance around the simple way these traversals work and try to teach tricks on how to remember them like with post order being bottom to top (with left to right) but actually going over them in this simple demonstration helps much more.

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

    Dude! Keep doing what you do. Thank you so much! Hope your channel grows and you get crap ton of views!

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

    Thanks for the video. It helped me so much. U deserves more like.

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

    many have teached me this I haven't understood
    but in this 7 min video i have understood properlyy
    thank youu

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

    Your tutorial was effective! I get it immediately, thank you

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

    Thank you for the awesome explanation! I could not understand this, no matter how anyone tried to explain it to me.

  • @user-cu9rw5nt6b
    @user-cu9rw5nt6b ปีที่แล้ว

    I learned very clear about this topic today its really help for my tomorrow's exam thanks man...

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

    Thank you thank you so so much...This is way easier to understand than what my teacher is giving us..😭😭I have a test tmwr and this helped me so much.. You just got yourself a new subscriber 😭

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

      Why dont the teachers teach this simple trick 😅

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

      @@techdose4u You are absolutely right..😭

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

    Mind blowing concept...I have seen many videos on this topic but none come as clear as yours.

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

    you are such a legend, what a life saver!!!

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

    bro this has to be the easiest method to understand! thank you so much :)

  • @girishu
    @girishu 5 หลายเดือนก่อน

    the best vedio on utube for this topic

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

    ✨you saved my academic life ✨

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

    Thanks for this wanderful work that has set me free from understanding pre- order, in-order and post-order.

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

    Thank you so much this video made topic very clear..I worried a lot without understanding the topic... thanks dude now I got it...

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

    The best explanation out there! Thanks.

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

    Thank you so much ! I finally understand how to solve the problems.

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

    Saved me huge amount of time. Thank you for this!

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

    bruh he makes it look so simple. thanks man

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

    Much simpler explanation, thank you.

  • @Ramkumar-rd8vq
    @Ramkumar-rd8vq 7 หลายเดือนก่อน

    Bestest video so far on this topic.🧡

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

    You saved my career by teaching this

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

    Thank you so much for this explaination it's very helpful
    I practiced so many questions after this and I got not a single wrong

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

    The best tree traversal explanation.......Thank you

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

    Easy Explanation. You saved my life!!

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

    Wow thanks to you i can finally ace my computing exams

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

    Great Video. I am starting binary tree from this video

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

      Nice :)
      All the best!

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

    Thank you so much. I couldn't understand this and I was so scared. Now I have understood thanks to you. THANK YOU

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

    Brilliant and outstanding and easiest way to solve this problem ❤❤❤You desrve the fees we pay for our studies in university.

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

    my professor explained it well but this is much easier to remember. thanks

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

    Great great tip i have exam tomorrow and this made my work easier

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

    Everyone Try This 💯 Working
    Thank you for making easy ❤️

  • @victor_okpala
    @victor_okpala 6 หลายเดือนก่อน +1

    You are an excellent teacher. ❤

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

    My headache has been cured sir. Thank you very much.

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

    GREAT VIDEO! i love how you explain every step!

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

    Very well explained in so easy way thankyou so much sir for helping me to understand in easy way thankyou

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

    Great explanation man, I can't believe I understood so quickly!