Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #72.7K
Floyd-Warshall(G) n=|V[G]| for (int i=1;i<=numNodes;i++) if connection weightmatrix[i][j]=weight; else weightmatrix[i][j] = infinite; if i=j weightmatrix [i][j]=0; for (int k=1; k<=numNodes; k++) for (int i=1; i<=numnodes; i++) for (int j=1; j<=numnodes; j++) a=weightmatrix[i][k]+weightmatrix[k][j]; if(a<weightmatrix[i][j]){ weightmatrix[i][j]=a;} return weightmatrix, matrixintnode; |