step remove the front element from the queue by setting front front so front rear queue agbcde step set indeg(findeg( since is the neighbour of now indeg( so add to the queue the queue now becomesfront rear queue agbcdef step delete the edge between and the graph now becomes as shown in the figure below there are no more edges in the graph and all the nodes have been added to the queueso the topological sort of can be given asagbcdef when we arrange these nodes in sequencewe find that if there is an edge from to vthen appears before figure topological sort of programming example write program to implement topological sorting #include #include #define max int ,adj[max][max]int front - ,rear - ,queue[max]void create_graph(void)void display()void insert_queue(int)int delete_queue(void)int find_indegree(int)void main(int node, ,del_nodeiint topsort[max],indeg[max]create_graph()printf("\ the adjacency matrix is:")display()/*find the in-degree of each node*for(node node <nnode++indeg[nodefind_indegree(node)ifindeg[node=