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

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

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 2 жыл бұрын
Was not able to understand after watching a lot of videos. you explained it really well. Thank you so mach
@ayushuniyal2586
@ayushuniyal2586 2 жыл бұрын
u are gem of dsa, DIAMOND. waiting of backtracking .
@prathmeshsanjayraonikam3016
@prathmeshsanjayraonikam3016 Жыл бұрын
Thanks Anuj Bhaiya!!! Next level explaination.
@sarthakchauhan8386
@sarthakchauhan8386 2 жыл бұрын
You're a blessing bhaiya.
@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.
@mohdshadab7338
@mohdshadab7338 Жыл бұрын
very very good explanation bhaiyya .....
@Ankit.yt_885
@Ankit.yt_885 Жыл бұрын
Very good explanation! Well done
@ashu3128
@ashu3128 Жыл бұрын
Very Good Explanation,thanks😊
@trainingbulls9069
@trainingbulls9069 2 жыл бұрын
very good and easy explaination, thank you bhaiya
@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!
@TackleGaming
@TackleGaming 2 жыл бұрын
Love you bhaiya ❣️ Aap ko
@user-oz2eu7rs8v
@user-oz2eu7rs8v Жыл бұрын
Great explanation
@rushabhajain3977
@rushabhajain3977 Жыл бұрын
Great explanation sir :)
@rohitvishwakarma9261
@rohitvishwakarma9261 Жыл бұрын
Nice explanation!
@raviyadav2552
@raviyadav2552 3 ай бұрын
simple and easy for implementation
@CgTutorials99
@CgTutorials99 2 жыл бұрын
Mast tha bhai ye
@NikhilSingh-ty9qs
@NikhilSingh-ty9qs Жыл бұрын
thankq bhaiya🙏
@hackstreet781
@hackstreet781 2 жыл бұрын
good work
@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
@alliswell3805
@alliswell3805 2 жыл бұрын
Love you bhaiya
@ramakrishnakcr4417
@ramakrishnakcr4417 6 ай бұрын
thank you
@chandraveersingh5561
@chandraveersingh5561 2 жыл бұрын
Hi bhaiya!
@shubhamprajapati8240
@shubhamprajapati8240 Жыл бұрын
Nice function acronyms
@muteddwrt6937
@muteddwrt6937 2 жыл бұрын
Anuj bhaiya please make videos on Dynamic Programming and Greedy Algorithm.
@ridelikeguru
@ridelikeguru 2 жыл бұрын
Sir kruskals algorithm kab ayega ?
@Prototype.abdullah
@Prototype.abdullah Жыл бұрын
This algorithm is most mind bang but some concept understanding and some out of mind last path compression
@abhishekupadhyay7505
@abhishekupadhyay7505 2 жыл бұрын
First💯💯
@rahulvast2612
@rahulvast2612 2 жыл бұрын
You also need to reduce rank of previous parent in find operation when performing path compression
@kevalkrishna4134
@kevalkrishna4134 Жыл бұрын
thnx a lot ,helped me in understanding kruskals algorithm .
@saritaprasad4295
@saritaprasad4295 Жыл бұрын
DSA fine
@onepercentbetter3313
@onepercentbetter3313 2 жыл бұрын
When can we expect system design videos?
@vimalkumardubey6834
@vimalkumardubey6834 Жыл бұрын
Well explained bhaiya ❤️✨
@mindbehaviour9195
@mindbehaviour9195 Жыл бұрын
🤯
@souravsaha933
@souravsaha933 2 жыл бұрын
Bhaiya kohi UI + backend mixed one projects video banao na 🙂
@arunyadav7467
@arunyadav7467 2 жыл бұрын
Jaldi jaldi video upload karo bhai please please 🙏
@chandraveersingh5561
@chandraveersingh5561 2 жыл бұрын
1
@SauravSingh-gx5rm
@SauravSingh-gx5rm 2 жыл бұрын
Bhaiya total kitne lectures hoge?
@avtaar3041
@avtaar3041 2 жыл бұрын
aap sikhte kaha se ho ? please ispe video bnao
@mainwhihoon
@mainwhihoon Жыл бұрын
Don't we need to update the ranks after doing path compression?
@sameerakhatoon9508
@sameerakhatoon9508 Жыл бұрын
ofc
@wolfgaming8690
@wolfgaming8690 2 жыл бұрын
when got stuck in any DSA concept i came here
@shadabalam8550
@shadabalam8550 2 жыл бұрын
Sir please koi python ka accha course btaiye Jo basic to advance level ka ho please please
@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 KZbin 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
Inside Out Babies (Inside Out Animation)
00:21
FASH
Рет қаралды 23 МЛН
路飞太过分了,自己游泳。#海贼王#路飞
00:28
路飞与唐舞桐
Рет қаралды 38 МЛН
ОБЯЗАТЕЛЬНО СОВЕРШАЙТЕ ДОБРО!❤❤❤
00:45
Disjoint Set | UNION and FIND
26:43
Techdose
Рет қаралды 110 М.
Java Developer Roadmap IN 2024 | Freshers and Experienced persons @kajalgoyal3902
7:48
Union Find in 5 minutes - Data Structures & Algorithms
5:46
Potato Coders
Рет қаралды 199 М.
DISJOINT SETS || WEIGHTED UNION || COLLAPSING FIND
15:27
t v nagaraju Technical
Рет қаралды 30 М.
Data Structures: Disjoint Sets:  Linked-List Implementation
16:20
Luay Nakhleh
Рет қаралды 3 М.
Disjoint set UNION by RANK and Path Compression
26:48
Techdose
Рет қаралды 50 М.
Inside Out Babies (Inside Out Animation)
00:21
FASH
Рет қаралды 23 МЛН