You are viewing a single comment's thread. Return to all comments →
Hey guys I'm getting only 24.38 points. Here is a psuedo code of mine.
lli Kruskal() { lli Minimum_Cost=0; lli i; rep(i,0,V.sz()) { lli x=V[i].S.F; lli y=V[i].S.S; lli w=V[i].F; if(root(x)!=root(y)) { cnt++; if(cnt==N-1) { cnt--; Count++; } else { Union(x,y); Minimum_Cost+=w; } } } return Minimum_Cost; }
And I print Minimum_Cost and Count.
Seems like cookies are disabled on this browser, please enable them to open this website
Super Mancunian
You are viewing a single comment's thread. Return to all comments →
Hey guys I'm getting only 24.38 points. Here is a psuedo code of mine.
And I print Minimum_Cost and Count.