Complete Trees Practice - Noob to Expert | Topic Stream 3

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

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

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

    Damn colin, people really be asking you to say their name , you a celeb.

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

      its more fine than simple tik tokers or youtube roaster saying them self so called a star. galen colin is intelligent and he deserve a place of celebrity.

  • @Vaidikjagani-u4q
    @Vaidikjagani-u4q ปีที่แล้ว

    In the first question, how is vector using the push_back method? shouldn't the declaration for children be vector? Why is this code working it should be a compilation error.

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

    Ur channel is underrated ... thanku so much buddy...pls make a series on how to master data structure and algorithms .. how to start competitive coding.. how to approach a algorithmic problem..it's my sincere request..

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

    Nice videos can U upload videos on queries on trees please:) as It is asked most frequently in many companies coding round:)

  • @kimjong-un4521
    @kimjong-un4521 2 ปีที่แล้ว +1

    Time to learn from Legend. Come to my country.

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

    this means so much to me , tysm

  • @ankitsingh-rb8pc
    @ankitsingh-rb8pc 4 ปีที่แล้ว +3

    this stream is really great thanks alot for this

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

    dear galen colin, please use a graphic tablet paired with OneNote or something similar for such long lectures, would be easy for you and us too

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

    Use Epic pen instead of Paint (i think that would be more easier)

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

    Thanks

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

    Can you make a stream on Binary Search questions?

  • @CristianRodriguez-it7il
    @CristianRodriguez-it7il 9 หลายเดือนก่อน

    NIce video, thanks!

  • @memoryLeak-CODE
    @memoryLeak-CODE 4 หลายเดือนก่อน

    AWESOME!

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

    Amazing Galen,,,,,,

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

    Why '+1' in Mashup B? I still don't understand that.

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

      because we need 1 to reach the children and then we find the average of distances of the children
      it basically that before finding the avg of children we need to reach children right? so +1 is distance to reach the children.

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

      @@mehulsethi5886 Okay it somewhat makes sense. But what if the edge lengths were different? Would we still have added '+1' or some other number?

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

      @@hardikraj9469 we would have added the edge length in that case

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

      @@mehulsethi5886 What if the edge lengths were different? Would we have added the maximum or the minimum edge length?

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

      @@hardikraj9469 the average of all edge lengths

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

    In problem B why can't we make a directed tree/ graph? Because we know we start from 1, so we can start from it. And we cannot re visit the parent so we will add directed edge from parent to child. Why doesn't this work? I tried but got wrong answer on test case 4.

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

      The problem is, you don't know which of the edges is the parent without running a DFS for more complicated trees. For example, take:
      1 2
      2 4
      4 3
      5 4
      where there's no good order to direct an edge (e.g. 4 is the parent of 3, but 5 is not the parent of 4)

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

      @@ColinGalen Got it. Thank You!

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

    as someone trying to code in python ,i find these problems offensive