Level order traversal of Binary Tree | Step by step demo with example | Study Algorithms

Поделиться
HTML-код
  • Опубликовано: 11 июл 2024
  • When you look at a binary tree, the first thing you might see is that each node is at a different height. This simply implies that you can traverse the tree level by level as well. For each level you go left to right, hence the element that is seen first should be processed first. Given this information we can take the help of a queue data structure to perform a level order traversal of binary tree. Watch this video to see a step by step procedure with a code sample written in JAVA.
    Chapters:
    00:00 - Intro
    01:10 - What is level order traversal?
    03:55 - Logic of level order traversal
    09:32 - Dry-run of code
    13:31 - Final Thoughts
    📚 Links to topics I talk about in the video:
    Understanding a Binary Tree: • Understanding Tree Dat...
    Queue Data Structure: • Queue Data Structure e...
    Playlist on Trees: • Trees
    📘 A text based explanation is available at: studyalgorithms.com
    Code on Github: github.com/nikoo28/java-solut...
    📖 Reference Books:
    Starting Learn to Code: amzn.to/36pU0JO
    Favorite book to understand algorithms: amzn.to/39w3YLS
    Favorite book for data structures: amzn.to/3oAVBTk
    Get started for interview preparation: amzn.to/39ysbkJ
    🔗 To see more videos like this, you can show your support on: www.buymeacoffee.com/studyalg...
    🎥 My Recording Gear:
    Recording Light: amzn.to/3pAqh8O
    Microphone: amzn.to/2MCX7qU
    Recording Camera: amzn.to/3alg9Ky
    Tablet to sketch and draw: amzn.to/3pM6Bi4
    Surface Pen: amzn.to/3pv6tTs
    Laptop to edit videos: amzn.to/2LYpMqn
    💻 Get Social 💻
    Follow on Facebook at: / studyalgos
    Follow on Twitter at: / studyalgorithms
    Follow on Tumblr at: / studyalgos
    Subscribe to RSS feeds: studyalgorithms.com/feed/
    Join fan mail: eepurl.com/g9Dadv
    #binarytrees #programming #traversal

Комментарии • 26

  • @rajeshpaithari7320
    @rajeshpaithari7320 2 месяца назад +2

    Excellent! I was able to solve the Zig zag tree using this. Thanks a lot!

  • @krutikadave4534
    @krutikadave4534 16 дней назад

    Your explanation is really helpful. Thank you.

  • @ashutoshkumarsingh2137
    @ashutoshkumarsingh2137 24 дня назад

    Finally I got the best solution.

  • @omkardeshmukh7130
    @omkardeshmukh7130 Месяц назад

    I would recommend your videos for everyone who is learning DS on RUclips.
    Your videos are well defined for beginners.
    Thank you for your efforts. 🙏

  • @vchandra6315
    @vchandra6315 2 года назад

    A Great Video Course! Thank you for explaining it in a clear way.

  • @adhirajkar7396
    @adhirajkar7396 Год назад +1

    Your explanation is the best on youtube

  • @manojtate9604
    @manojtate9604 4 месяца назад

    great clarification !

  • @mikedelta658
    @mikedelta658 5 месяцев назад +1

    You're a real teacher. Thank you Dear.

    • @nikoo28
      @nikoo28  4 месяца назад

      So nice of you

  • @shlokagarwalentertainment9747
    @shlokagarwalentertainment9747 4 месяца назад

    u r the best . thaNKS FOR EXISTING SIR . YOU HELPED ME NAIL IT

  • @sirishagch
    @sirishagch Месяц назад

    Great explanation! Thankyou!

    • @nikoo28
      @nikoo28  Месяц назад

      You're very welcome!

  • @sayantanX
    @sayantanX Год назад

    Thank you sir.

  • @onelove177
    @onelove177 2 месяца назад

    Woww! I have watched almost every video of top youtubers but can't get. Now I get it😍 Thank you sir

    • @nikoo28
      @nikoo28  2 месяца назад

      Most welcome 😊

  • @manakosam7501
    @manakosam7501 2 месяца назад

    Hi bro! I recently started following your videos, they are really awesome the way you are explaining can make any noob to pro. More power and love to you bro keep growing bro❤

    • @nikoo28
      @nikoo28  2 месяца назад

      A new video every week 😄

  • @chakravarthybatna1589
    @chakravarthybatna1589 10 месяцев назад

    really great explanation bro

    • @nikoo28
      @nikoo28  9 месяцев назад

      all the best

  • @vibhanshusharma9143
    @vibhanshusharma9143 6 месяцев назад

    You are very good 👍

    • @nikoo28
      @nikoo28  5 месяцев назад

      Thank you! Cheers!

  • @ionguzun3952
    @ionguzun3952 Год назад +1

    nice video, can you do more about trees?

    • @nikoo28
      @nikoo28  Год назад

      Check out my playlist on trees. It has a bunch of stuff

  • @nageshnimmala7366
    @nageshnimmala7366 Год назад

    Do some videos on views of a tree