Greedy Algorithms/FloydWarshall-AllPairShortestPath.c
/* A utility function to print solution */
A utility function to print solution
A utility function to print solution
void printSolution(int dist[][V]) 
{ 
    printf ("The following matrix shows the shortest distances"
            " between every pair of vertices \n"); 
    for (int i = 0; i < V; i++) 
    { 
        for (int j = 0; j < V; j++) 
        { 
            if (dist[i][j] == INF) 
                printf("%7s", "INF"); 
            else
                printf ("%7d", dist[i][j]); 
        } 
        printf("\n"); 
    } 
}
void printSolution ( int dist [ ] [ V ] ) { printf ( " " " \n " ) ; for ( int i = 0 ; i < V ; i ++ ) { for ( int j = 0 ; j < V ; j ++ ) { if ( dist [ i ] [ j ] == INF ) printf ( " " , " " ) ; else printf ( " " , dist [ i ] [ j ] ) ; } printf ( " \n " ) ; } }
A utility function to print solution
A utility function to print solution