Disjoint Set Union Fundamentals | Union Find | Small to Large merging | Part 1

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.ย. 2024
  • We will cover Disjoint Set Union's Advanced ideas soon, however, building the basics clearly is very important. Watch it to build a clear conceptual understanding of the ideas.
    Do share with your friends who are doing CP besides you / Are preparing for internships and placements.
    ✨ Hashtags ✨
    #VivekGupta #Competititve #CPStreams #codechef #codeforces #engineering #internship
    -------------------------------------------------------------------------------------------------------------
    If you are a beginner, here are some resources to start with :
    ✅ Free Language course with certificate that i taught - bit.ly/3I52EAb
    ✅ More free courses - bit.ly/3SKoCNO
    If you are looking to train in a commado like regime for acing DSA (with DEV and System Design covered for placement too), do checkout :
    🔴 bit.ly/3SKoM7S
    If you want to connect over social media or want more resources : linktr.ee/vive...

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

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

    Do like and subscribe to support creating more such content. Also feel free to suggest/discuss more stuff on this series :D

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

      Bhai ye video playlist me add nhiye .. krdo

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

      Our bich bich me hindi bola kro hum convent medium se nhi hai ... Toh link break ho jati hai lecture se bich bich me

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

      @@Go_Golang Mai CP wala content english me hi rakhne ki kosish karta hu... but i understand.

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

    amazing content, yt needs more educators than self-promoters. Keep up the good work

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

    Very Well Explained! Also, Please do add some links to good educational problems (5-6) after the video to practice, it would be helpful for those who are beginner and learning for the first time !

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

    You are gifted teacher! Thanks for sharing your knowledge with the world! Go AZ!

  • @Hydra_cody
    @Hydra_cody 7 หลายเดือนก่อน +6

    video - audio lagging for all ??? or its only for me..

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

      same problem

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

    best teacher ever

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

    Persistent segment trees please or the idea of persistent data structures in general.

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

    Thanks for this series

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

    sir please make videos on dp on trees and graphs...ur explanation is so good

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

    Super excited for this

  • @Star-xk5jp
    @Star-xk5jp 10 หลายเดือนก่อน

    thank you vivek😀

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

    it should be swap(rootx,rooty) right?

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

      Absolutely. Thanks for the correction. Good to see that you watched and understood the things in detail.

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

      I too was going to say that

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

      @@vivekgupta3484 one question, if rank(height) of both trees are same, wouldnt the height of combination be same. ( Then we should not have done rank[rootx]++ ?)
      Oh while typing out the question, i realized why is it happening. Nevermind thanks. Got it.( Thats why you say write comments)

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

      @@priyanshsinghal11 absolutely... when you write things to explain, things become 10x more clearer for you.

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

    Bhaiya please make videos on segment and Fenwick trees also

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

      Ya, segment tree idea summary is something that i am planning to make after this DSU series

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

      @@vivekgupta3484 yes please
      Your content is very good and informative

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

    When we are using size instead of rank , then rank(size) should be initialize with rank[i] = 1;(line 41)?? Or I am missing something.?

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

      Both 0 and 1 works for rank_by_height. Its just like 1 indexing or 0 indexing of height. But when we are using by_size (at end), it should be made 1.

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

    48:13
    A small correction in unite function()
    it should not be swap(x, y)
    it should be swap(rootx, rooty)
    I know in live lecture these things happens, and the main thing is concept, but I thought it would be better to mention this.