MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / findpair

Function findpair

CPP/graphseries.cpp:460–464  ·  view source on GitHub ↗

function to find the parent of the node in the set kruskalsalgo

Source from the content-addressed store, hash-verified

458
459//function to find the parent of the node in the set kruskalsalgo
460int findpair(int n,vector<int>&parent){
461 if(parent[n]==n)return n;
462
463 return parent[n]= findpair(parent[n],parent);
464}
465
466void kruskalsAlgo(){
467 int n,m;

Callers 2

unionnFunction · 0.85
kruskalsAlgoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected