Union Find Algorithm | Disjoint Set | Union By Rank & Path Compression | DSA-One Course #84

  Рет қаралды 68,169

Anuj Bhaiya

Anuj Bhaiya

2 жыл бұрын

Hey guys, In this video, We're going to learn about the Disjoint Set Data Structure.
The partitioning of the individuals into different sets according to the groups in which they fall. This method is known as a disjoint set data structure which maintains a collection of disjoint sets and each set is represented by its representative which is one of its members.
🥳 Join our Telegram Community:
Telegram channel: telegram.me/realanujbhaiya
Telegram group: telegram.me/dsa_one
🚀 Follow me on:
Instagram: / anuj.kumar.sharma
Linkedin: / sharma-kumar-anuj
Twitter: / realanujbhaiya
💸 Use coupon code ANUJBHAIYA on GeeksforGeeks to avail discounts on courses!
📚 Complete DSA Playlist: • DSA-One Course - The C...
Complete Android Development Playlist: • Android Development Tu...
Hashtags:
#anujbhaiya #dsaone
Tags:
union find
union find algorithm
disjoint set union
disjoint set data structure
disjoint set
anuj bhaiya
disjoint sets
union by rank
union find data structure
anuj bhaiya java
disjoint set manipulation
anuj bhaiya dsa
union-find data structure
disjoint set operation
disjoint sets in daa
dsu
kruskal algorithm
union and find algorithms
union and find operation in daa
union by rank and path compression
union-find
anuj bhai
bellman ford algorithm
code with harry
codehelp
data structure
dsa java
dsa playlist
dsp anuj bhaiya
dsu graph
find and union
flask tutorial
java anuj bhaiya
java dsa
passportjs
path compression
rotten oranges leetcode
set and disjoint set union
set data structure
sets and disjoint set union in daa
tree in dsa
union
union and find
union and find algorithm
union find gfg
union set
union-find gfg
disjoint set in coding
disjoin set code java
union find java c++

Пікірлер: 62
@redeye4170
@redeye4170 2 жыл бұрын
@Anuj Bhaiya thanks you for this course, finally got placed in Amazon, got a lot of things from this course.
@onepercentbetter3313
@onepercentbetter3313 2 жыл бұрын
Wow superb please provide some guidance on the same
@onepercentbetter3313
@onepercentbetter3313 2 жыл бұрын
If you don't mind
@somrawat4280
@somrawat4280 Жыл бұрын
Bhai referal de da
@HackShield_girl
@HackShield_girl Жыл бұрын
Brother could you please send my refferal at Amazon bcoz my college is coming in 3 tier college so that's why I'm requesting you please reffer my resume
@aarshp
@aarshp Жыл бұрын
Was not able to understand after watching a lot of videos. you explained it really well. Thank you so mach
@prathmeshsanjayraonikam3016
@prathmeshsanjayraonikam3016 Жыл бұрын
Thanks Anuj Bhaiya!!! Next level explaination.
@sarthakchauhan8386
@sarthakchauhan8386 2 жыл бұрын
You're a blessing bhaiya.
@Ankit.yt_885
@Ankit.yt_885 Жыл бұрын
Very good explanation! Well done
@ayushuniyal2586
@ayushuniyal2586 2 жыл бұрын
u are gem of dsa, DIAMOND. waiting of backtracking .
@trainingbulls9069
@trainingbulls9069 2 жыл бұрын
very good and easy explaination, thank you bhaiya
@ashu3128
@ashu3128 Жыл бұрын
Very Good Explanation,thanks😊
@mohdshadab7338
@mohdshadab7338 Жыл бұрын
very very good explanation bhaiyya .....
@TackleGaming
@TackleGaming 2 жыл бұрын
Love you bhaiya ❣️ Aap ko
@rushabhajain3977
@rushabhajain3977 Жыл бұрын
Great explanation sir :)
@rohan8758
@rohan8758 2 ай бұрын
Great explanation bhaiyan, By the way how much time it took to you learn DSA with 300-500 pratice problems on hackerrank GFG, Leetcode etc plaforms.
@user-oz2eu7rs8v
@user-oz2eu7rs8v Жыл бұрын
Great explanation
@NikhilSingh-ty9qs
@NikhilSingh-ty9qs Жыл бұрын
thankq bhaiya🙏
@rohitvishwakarma9261
@rohitvishwakarma9261 Жыл бұрын
Nice explanation!
@raviyadav2552
@raviyadav2552 3 ай бұрын
simple and easy for implementation
@harry-cf4ii
@harry-cf4ii 2 жыл бұрын
Bhaiya when is the DSA one course ending?🙏🔥pls provide a expected timeline so that we can plan accordingly.
@Isha_Sethi
@Isha_Sethi 2 жыл бұрын
yes!
@CgTutorials99
@CgTutorials99 2 жыл бұрын
Mast tha bhai ye
@alliswell3805
@alliswell3805 2 жыл бұрын
Love you bhaiya
@hackstreet781
@hackstreet781 2 жыл бұрын
good work
@shubhamprajapati8240
@shubhamprajapati8240 Жыл бұрын
Nice function acronyms
@ramakrishnakcr4417
@ramakrishnakcr4417 6 ай бұрын
thank you
@muteddwrt6937
@muteddwrt6937 2 жыл бұрын
Anuj bhaiya please make videos on Dynamic Programming and Greedy Algorithm.
@chandraveersingh5561
@chandraveersingh5561 2 жыл бұрын
Hi bhaiya!
@ridelikeguru
@ridelikeguru 2 жыл бұрын
Sir kruskals algorithm kab ayega ?
@rahulvast2612
@rahulvast2612 2 жыл бұрын
You also need to reduce rank of previous parent in find operation when performing path compression
@Prototype.abdullah
@Prototype.abdullah Жыл бұрын
This algorithm is most mind bang but some concept understanding and some out of mind last path compression
@devanshtripathi2603
@devanshtripathi2603 2 жыл бұрын
hello bhaiya i have finally completed this course till this video but you recently announced a paid course on dsa which is not possible for me to afford because i am short of money.....kya ap is dsa course ko aage continue krenge?if possible isko please band mat kriyega mere jaise logo ke liye ye course amrit hai
@onepercentbetter3313
@onepercentbetter3313 2 жыл бұрын
When can we expect system design videos?
@abhishekupadhyay7505
@abhishekupadhyay7505 2 жыл бұрын
First💯💯
@souravsaha933
@souravsaha933 2 жыл бұрын
Bhaiya kohi UI + backend mixed one projects video banao na 🙂
@saritaprasad4295
@saritaprasad4295 Жыл бұрын
DSA fine
@kevalkrishna4134
@kevalkrishna4134 Жыл бұрын
thnx a lot ,helped me in understanding kruskals algorithm .
@avtaar3041
@avtaar3041 2 жыл бұрын
aap sikhte kaha se ho ? please ispe video bnao
@SauravSingh-gx5rm
@SauravSingh-gx5rm 2 жыл бұрын
Bhaiya total kitne lectures hoge?
@mindbehaviour9195
@mindbehaviour9195 Жыл бұрын
🤯
@arunyadav7467
@arunyadav7467 2 жыл бұрын
Jaldi jaldi video upload karo bhai please please 🙏
@mainwhihoon
@mainwhihoon Жыл бұрын
Don't we need to update the ranks after doing path compression?
@sameerakhatoon9508
@sameerakhatoon9508 Жыл бұрын
ofc
@vimalkumardubey6834
@vimalkumardubey6834 Жыл бұрын
Well explained bhaiya ❤️✨
@chandraveersingh5561
@chandraveersingh5561 2 жыл бұрын
1
@shadabalam8550
@shadabalam8550 2 жыл бұрын
Sir please koi python ka accha course btaiye Jo basic to advance level ka ho please please
@wolfgaming8690
@wolfgaming8690 2 жыл бұрын
when got stuck in any DSA concept i came here
@gamerglobe4839
@gamerglobe4839 Жыл бұрын
help why this code is not submitting even all the conditions are same? class GfG { int rank[]=new int[1000001]; int find(int A[],int X) { if(A[X]==X) return X; return find(A,A[X]); } void unionSet(int A[],int X,int Z) { int a=find(A,X); int b=find(A,Z); if(a==b) return; if(rank[a]
@aishwaryshukla8880
@aishwaryshukla8880 Жыл бұрын
gfg is saying that parent of Z should become the parent of X. so instead of writing A[b]=a; in your code, write A[a]=b; The following code works although it doesn't implement rank: class GfG { int find(int A[],int X){ //add code here. if(A[X] == X){ return X; } return find(A, A[X]); } void unionSet(int A[],int X,int Z) { //add code here. int xRoot = find(A, X), yRoot = find(A, Z); if (xRoot == yRoot)return; else{ A[xRoot] = yRoot; } } }
@dss963
@dss963 Жыл бұрын
I don't think path compression makes any sense , because as we find parent of two nodes in an edge , we are already setting represntative element being the parent of any node being connected to that component.
@reapercreeper6097
@reapercreeper6097 Жыл бұрын
No we are not setting it as parent of node connected to that component, we are just setting it as it's immediate parent
@shadabalam8550
@shadabalam8550 2 жыл бұрын
Any people tell me python course basic to advance level please
@AnujBhaiya
@AnujBhaiya 2 жыл бұрын
Hi Shadab, We have Python in One video which is a good place to start learning Python. For More Advanced concepts, You can refer to the FreeCodeCamp KZfaq channel.
@shadabalam8550
@shadabalam8550 2 жыл бұрын
@@AnujBhaiya Sir I see your course complete but I think not advance level
@kaptaindeveloper7800
@kaptaindeveloper7800 2 жыл бұрын
Bhaiya aap shaadi kab karoge?
@AnujBhaiya
@AnujBhaiya 2 жыл бұрын
It'll get done in the next month.
@shrutipant7864
@shrutipant7864 2 жыл бұрын
Cleverly edited :D
@anoridinaryhumanbeing70
@anoridinaryhumanbeing70 2 жыл бұрын
DISGUSTING! XD
@vaibhavtale318
@vaibhavtale318 2 жыл бұрын
@@AnujBhaiya really !!!
G-46. Disjoint Set | Union by Rank | Union by Size | Path Compression
42:15
БАБУШКИН КОМПОТ В СОЛО
00:23
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 15 МЛН
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 8 МЛН
Disjoint Sets using union by rank and path compression Graph Algorithm
17:49
Tushar Roy - Coding Made Simple
Рет қаралды 311 М.
How I would learn Leetcode if I could start over
18:03
NeetCodeIO
Рет қаралды 374 М.
Dhruv Rathee Analysis | Fame Ke Bhooke | Purav Jha
18:56
Purav Jha
Рет қаралды 6 МЛН
Disjoint Set Operations - Simple Union & Find Algorithms |L-10||DAA|
10:15
Disjoint Set | UNION and FIND
26:43
Techdose
Рет қаралды 110 М.
Algorithms Explained for Beginners - How I Wish I Was Taught
17:38
Internet Made Coder
Рет қаралды 333 М.
Intro to Competitive Programming
11:41
Junferno
Рет қаралды 767 М.
БАБУШКИН КОМПОТ В СОЛО
00:23
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 15 МЛН