Binary Tree - Level Order Traversal (BFS)

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ธ.ค. 2024

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

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

    awesome video!

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

      I'm glad it helped, dimaz2k! :)

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

    Can you talk about why you are using a arraydeque ?

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

      Hi Alex Yip. Instead of implementing / building upon one of the Queues I created in the previous videos (which if you want you can use), I thought it would be easier for people who missed those videos to use a class built into Java's API documentation. With that being said, I chose an ArrayDeque as an Array based solution. Now, there are some performance differences regarding a LinkedList and an ArrayDeque in Java. (Excluding their general time/space efficiency differences). These differences have more to do with Java than the data structures themselves. You can always look further into it if you wish. The key to take away though is that the general time/space differences between and array and linked list still hold.
      Hope this helps :)