DP on Trees: Distance in Tree

Поділитися
Вставка
  • Опубліковано 29 січ 2025

КОМЕНТАРІ • 37

  • @reshovroy7799
    @reshovroy7799 4 роки тому +18

    You are doing a great job!! thank you!, most youtubers don't cover these topics.... i hope in future videos you will cover problems on bitmask dp and other forms of tree queries

    • @AlgosWithKartik
      @AlgosWithKartik  4 роки тому +2

      I will try my best and yes dp with bitmask is most likely the next topic to be covered.

  • @sujoyseal195
    @sujoyseal195 4 роки тому +6

    Awesome man.... awesome. Really helpful and explanation is to the point. The one generic template for DP on trees you have discussed so far in your playlist is applicable everywhere.

  • @debdattabiswas4902
    @debdattabiswas4902 4 роки тому +2

    Crystal clear explanation. Following this entire playlist to learn dp on trees. Thank you so much for making videos on these rare but important topics.

    • @AlgosWithKartik
      @AlgosWithKartik  4 роки тому

      Glad to know that, hope that you get to learn some useful techniques :)

  • @smitmistry9312
    @smitmistry9312 3 роки тому +3

    I will submit my code and get accepted was my favorite part. Great Explanation

  • @mayankchaudhary5515
    @mayankchaudhary5515 4 роки тому +1

    This was amazing, waiting for other CSES tree dp problems :)

  • @devsharma8290
    @devsharma8290 4 роки тому +1

    Thanks sir, this is a very good initiative taken by you. I really needed this information

  • @adityatadiparthi2255
    @adityatadiparthi2255 Рік тому +1

    can we have the list of tree dp questions list like these , would be very helpful ..

  • @SunilPatel-iy7zr
    @SunilPatel-iy7zr 3 роки тому

    Thanks for making such awesome content. Please continue posting more videos and content related to dp on trees.

  • @prathmeshsharma4258
    @prathmeshsharma4258 Рік тому +2

    Thankyou Kartik🫡

  • @Ayushman-fv2iq
    @Ayushman-fv2iq 8 місяців тому +1

    really nice and clear explanation sir

  • @tle964
    @tle964 4 роки тому +1

    thanks sir:) it was my wish that you could start a playlist on random codeforces problem solving.

    • @AlgosWithKartik
      @AlgosWithKartik  4 роки тому +1

      I am glad that you are enjoying the content!

  • @account2datadata931
    @account2datadata931 4 роки тому +1

    Hi, one doubt when you are counting the no of nodes at 14:07, for any child you are counting the no of nodes at dist k from its child and from its parents.
    But won't there be some nodes which are at dist k from child ch which are from the parent of parent... Hope you got my point

    • @AlgosWithKartik
      @AlgosWithKartik  4 роки тому +1

      I do think I understand your doubt.
      Are you asking about why don't I account the nodes that are at a distance of k-2 from parent of parent?
      If that's your doubt then those nodes are already accounted for. How? The nodes which are at distance k-2 from parent of parent are at distance of k-1 from parent which we are taking into account.
      I suggest taking a pen and paper and trying to convince yourself of the validity and if still you have some doubt I'll be happy to help :)

    • @account2datadata931
      @account2datadata931 4 роки тому +1

      @@AlgosWithKartik yes it clears

  • @anubhavayushman4842
    @anubhavayushman4842 3 роки тому

    how can we implement it if there are multiple values of k?

  • @yourbestie4138
    @yourbestie4138 2 роки тому +1

    superb explanation broooooo

  • @illusionEditorss
    @illusionEditorss 3 роки тому +1

    Just Awesome !

  • @rajrawat1290
    @rajrawat1290 Рік тому

    Interesting problem !

  • @rishabhkumar8115
    @rishabhkumar8115 2 роки тому +1

    ou are doing a great job!! thank you!, most youtubers don't cover these topics.... i hope in future videos you will cover problems on bitmask dp and other forms of tree queries

  • @yashugarg2691
    @yashugarg2691 4 роки тому

    Sir why you use (d-2) for children?

  • @okmidnight1716
    @okmidnight1716 4 роки тому

    very well explained bro .. thanks a lot

  • @anandkanade9500
    @anandkanade9500 4 роки тому +1

    Please can you share must learn topics to become good at competitive programming
    Please

  • @ankitsingh-rb8pc
    @ankitsingh-rb8pc 4 роки тому

    Congratulations for 1k i am 1kth subscriber💥

  • @palakchandra8952
    @palakchandra8952 4 роки тому

    Thanks, this was really helpful!

  • @factStorybybong
    @factStorybybong 5 місяців тому

    Nice Algorithms

  • @yashwanth8058
    @yashwanth8058 4 роки тому

    Please make a video on ur cp journey

    • @AlgosWithKartik
      @AlgosWithKartik  4 роки тому +1

      Yes I have planned to add videos on my CP journey, my Interview experiences and more :)