Skip to content

Commit

Permalink
Update kruskals.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
nandwalritik authored Apr 26, 2022
1 parent fafd65a commit c4f9165
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graph/kruskals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ bool comp(node a,node b){
int findPar(int u,vector<int> &parent){
if(u == parent[u])
return u;
return findPar(parent[u],parent);
return parent[u] = findPar(parent[u],parent);
}
void Union(int u,int v,vector<int> &parent,vector<int> &size){
u = findPar(u,parent);
Expand Down

0 comments on commit c4f9165

Please sign in to comment.