// LAB 19 : Dijkstra's Algorithm /* Theory: Dijkstra's Algorithm is a graph traversal technique used to find the shortest path from a single source vertex to all other vertices in a weighted graph. It operates by iteratively selecting the vertex with the smallest known distance, updating the distances of its neighbors, and marking it as visited until all vertices have been processed. */ //Program: #include #include #define INFINITY 9999 #define MAX 10 void dijkstra(int G[MAX][MAX],int n,int startnode); int main() { int G[MAX][MAX],i,j,n,u; printf("Enter no. of vertices:"); scanf("%d",&n); printf("\nEnter the adjacency matrix:\n"); for(i=0;i