G-46. Disjoint Set | Union by Rank | Union by Size | Path Compression
In this video, I have shown you such a code snippet, which can solve any problem on Disjoint Set on any platform.
C++ Code Snippet of DS: ide.geeksforgeeks.org/392f3f8...
Java Code Snippet of DS: ide.geeksforgeeks.org/fde794b...
C++/Java/Codes and Notes Link: takeuforward.org/data-structu...
DP Series: • Striver's Dynamic Prog...
SDE Sheet: takeuforward.org/interviews/s...
Check out our Website for curated resources:
Our Second Channel: / @striver_79
In case you are thinking to buy courses, please check below:
Code "takeuforward" for 15% off at GFG: practice.geeksforgeeks.org/co...
Code "takeuforward" for 20% off on sys-design: get.interviewready.io?_aff=takeuforward
Crypto, I use the Wazirx app: wazirx.com/invite/xexnpc4u
Take 750 rs free Amazon Stock from me: indmoney.onelink.me/RmHC/idje...
Earn 100 rs by making a Grow Account for investing: app.groww.in/v3cO/8hu879t0
Linkedin/Instagram/Telegram: linktr.ee/takeUforward
---------------------------------------------------------------------------------------------------------------------------
Пікірлер: 356
Let's continue the habit of commenting “understood” if you got the entire video. Please give it a like too,. Do follow me on Instagram: striver_79
@prem263
Жыл бұрын
Hi, During example explanation, you have mentioned to update parent of u or parent of v depending on rank of parent of u and v. but in code you are updating parent[ulp_u] which is parent of ultimate parent of u at 29:19. Can you please clarify why is this difference.
@cartube6219
Жыл бұрын
java ka code likh k kya hi matlab , jab aap samjhate nhi , jesaa c++ ka code likhte ho vesaa live java ka likha rao app plz ,, c++ ka code side me chika diya karo , c++ community bahut badi hai , woh help leke manage kr lenge ,, but java walo ka kya ??
@abhikantkumar8833
Жыл бұрын
@@cartube6219 bro both java and c++ are almost same , there are only some minor syntax difference.
@sudhanshushekhar4222
Жыл бұрын
Understood
@abhinavgupta8839
2 ай бұрын
HIndi wala chiye solutions
Me looking here nd there while video is playing, then suddenly I looked at the striver's face and found that he is more serious about my career then I myself. This motivated me and my focus boosted. Thank you striver. 🙏😌
Watching this video after watching Abdul Bari sir's video. Both are legends in their own way. Great learning ❤️
@yashkagi5399
Жыл бұрын
i used to watch abdul bari's video for sleeping as his voice is very monotonous
@vm1662
11 ай бұрын
Same! I just watched Abdul Bari sir's video and now watching Striver. These two are blessings to CS students.
@movieskingdom1748
10 ай бұрын
Khud se bhi karle bhai..sirf video dekhne se kuch ni hota.
@shubhamkumar-hx1fb
3 ай бұрын
@@yashkagi5399😂
@shubhamkumar-hx1fb
3 ай бұрын
@@movieskingdom1748 khud se questions kiye jate Hain algos ke to videos hi dekhne padte hain 😂
This was the toughest topic in Graph. So in case someone finds it difficult to understand while watching it for the first time. I suggest you to watch the next few videos and come back and do some brainstorming and then again see this video. I tell you this because it worked for me. And clearly no other videos have this depth explanation on KZread. You will know how beautifully Striver has explained once the working of Disjoint Sets starts ticking your mind. Just watch some of the next videos and then come back and watch this.
@lavanyam3224
3 ай бұрын
yes you're right, after watching the next few videos, it makes more sense. I also watched Tushar roy's video on Disjoint sets, it helped too :)
The more I see his videos, his work, the more I respect him.
wow literally blown my mind such depth of covering each point with intutition..,.massive amount of practice and hardwork is behind all this..
Please bring such more series of other topics as well. These series are too amazing and easy to understand. Loved your way of teaching as well.
Understood! Such an awesome explanation as always, thank you very much!!
Exceptional content on KZread. Hats Off
Wow! That was one of the best tutorials I've ever seen.
I did understood the class partially not fully but striver's videos have a good content .literally he is my trainer
This concept was quite complicated and you, as always, made it look so easy. Thanks a lot!
Understood . Great to have people like you
Watched it again after 5 months, can't thank you enough my man
UnderStood Sir🔥🔥 No one can teach like you 😎😎..
In college, i never did coding even though i was in Cse branch. Because i never liked competetive programming. But after coming into tech industry, i started liking to code and solve problems. So i have started learning various ds and i must say the content u have created is awesome. I love it .Awesome explanations . Thanks brother!
@sameerakhatoon9508
Жыл бұрын
can you please lmk w/ which job you started?
@varunaggarwal7126
Жыл бұрын
same with me.
@musharrafhussain130
11 ай бұрын
systumm!
@rollercoaster9719
10 ай бұрын
now the biggest qn is, how the hell did u get a job if u never did coding in college
@shibainu7500
4 ай бұрын
@@rollercoaster9719 Aisa hi hota tha
Impressive man.I understood all concepts told in this video.
This was such a nice video. Thank you for teaching all this for free!
your graph series is best on youtube
THIS WAS THE BEST EXPLANATION OF DISJOINT SET. OMG !!!!!!!
I wish I could hit the like button a thousand times! Thank you, Striver
Understood. Striver Sir, this is great to launch dp and graph series. No teacher can do better dry run of the logic like you.
Through this video i am able to understand dsu properly before this i go through various videos and articles but don't get it like after this video thanks bhaiya 🙂
Understood! Such an awesome explanation as always, thank you very much!!🤓
understood. best best best explanation. no one can match this ever
As always amazing video. Understood everything but had to watch twice.
Teaching with such a fluency.....Big Fan Sir!!
Now this is quality content.. ❤❤❤
Understood! Thanks a lot Striver.
Thanks for creating this video, wonderful explanation
Striver bhaiya you are legend for us🔥🔥.i wish that anytime i could meet you.
Astonishing work!
This is the first topic I had to refer some other resource to understand after your video. I love your content but this was the only time I had to go to some other place to understand the concept.
Consistency is amazing ✨✨✨✨❤️🔥
No one can teach like you!
UnderStood bhaiya...thankYOu soo much
Fantastic explanation! thanks a lot my man
Brilliant explanation. Loved it.
Wow such clear explanation!
Thanks for this wonderful explanation sir
Great explanation🚀 understood!!
Not a single dislike shows, a man with no hatred only respect.
What an explanation. Hats off🫡
Very nice explanation for union-find algorithm. Thank you very much bhaiya! 🙂
As always great explanation 🙂
what an explanation! THANKYOU
Understood sir ,thankyou for your support.
Thanks a lot for making such videos it is really helpful. Great Content
Amazing content as always!!!!
What a detailed explanation 👏👏
impressed , subscribed at first video itself.
you inspired me today . Thank you
Understood everything you taught in video.
great explanation help me to understand within few minutes at X2 speed, Instead of searching it over internet and spending lot of time.
Thank You So Much for this wonderful video...................🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
You made this topic look very easy thanks
Understood very well. Thank you 😄😄😄😄😄😄,
understood striver!!! THANK YOU
lots of love and respect🙌
understood ,great explanation
just wow.. superb explanation..
You are the best🙌
understood. And you are awesome!
Amazing video loved it
Very well explained. Thanks
understood, love your videos
Awesome Explanation♥
Understood all the stuffs ❤❤
Very well explained!
Understood bhaiya 🙏❤️
One of the toughest topics in DSA, I've learned till now, DP was much easier. 🙂🙂🙂🙂🙂🙂
@KeshavSingh-yu9jw
Жыл бұрын
Maybe you learned about disjoint joint first time today, It all comes down to practice. After some practice you will find it easier(that's the case with me). So lets keep grinding.
@sayakghosh5104
Жыл бұрын
@@KeshavSingh-yu9jw yes today itself... Let's grind 😊
@krishanpratap3286
Жыл бұрын
hey it will be easy once u solve some que with this / btw which year ?
@sayakghosh5104
Жыл бұрын
@@krishanpratap3286 3rd Year. 🙂
@KeshavSingh-yu9jw
Жыл бұрын
@@sayakghosh5104 I am in 3rd year as well.
thanks man wow what a lecture
Understood Very good bro keep it up .....
Amazing explanation
best of all !! kudos to you bro
Thank You Striver💖💖
Thank you! This is is the best explanation of Disjoint Set I've come across. By the way I have a request for one other video. Can you please upload a video explaining leetcode 992 problem. I tried to understand through other channels but I didn't get it. The problem asks us to find the number of subarrays with exact K different integers. Thanks!
Understood!🔥
Understood! ❤️
Understood...Thank U striver...
Understood as always :)
Understood very well
amazingly explained
Best videos dp and graph🙏
Understood 🙏
Awesome!
The content💯🔥
clearly understandable thanks
goldmine for DSA🔥🔥
Bhai love from odisha ….i have been following you since last year and i feel so confident about the topics that I learned from you ….. “ KEI DINA DEKHA HABA “ - my goal 😂😂
@krishanpratap3286
Жыл бұрын
which year u at?
@ashishdhal4614
Жыл бұрын
Bhai kou college
Understood 🔥🔥
Wonderful !!
Understood!
this was fantastic..
Understood❤
Understood 💯
very well explained
this is amazing application really very nice video
Understood Sir!
Thank you so much brother