front= queue[++rearnode int delete_queue(int del_nodeif (front =- |front rearprintf("\ underflow ")return else del_node queue[front++]return del_nodeint find_indegree(int nodeint ,in_deg for( <ni++ifadj[ ][node= in_deg++return in_degoutput enter number of vertices enter edge ( to quit) enter edge ( to quit) enter edge ( to quit) enter edge ( to quit) enter edge ( to quit) enter edge ( to quit) enter edge ( to quit) enter edge ( to quit) the topological sorting can be given as shortest path algorithms in this sectionwe will discuss three different algorithms to calculate the shortest path between the vertices of graph these algorithms includeminimum spanning tree dijkstra' algorithm warshall' algorithm while the first two use an adjacency list to find the shortest pathwarshall' algorithm uses an adjacency matrix to do the same minimum spanning trees spanning tree of connectedundirected graph is sub-graph of which is tree that connects all the vertices together graph can have many different spanning trees we can assign weights to each edge (which is number that represents how unfavourable the edge is)and use it to assign weight to spanning tree by calculating the sum of the weights of the edges in that spanning