Question: Can anyone solve this ? thank you. Write a program for topological ordering of a graph. The input to your program is a directed acyclic

Can anyone solve this ? thank you. Can anyone solve this ? thank you. Write a program for topological

Write a program for topological ordering of a graph. The input to your program is a directed acyclic graph in its adjacency list format (for any vertex only outgoing edges are stored). The output is a topological ordering of the graph. Your program (which should run on CSE machines) should read from the file data 3.txt and write to the file out3.txt. As usual (referring to assignment 1) include a readme file containing all needed information. For this assignment, the input files contain only one graph. Each line of input file starts with name of a vertex followed by name of vertices that are adjacent to that vertex (separated by spaces). Input graphs have at most 50 vertices. Vertices are numbered as consecutive integers. For this assignment you could use STL, you can use STL vectors and strings. Example input 123 23 3 Example output Topological ordering is: 1, 2, 3 Write a program for topological ordering of a graph. The input to your program is a directed acyclic graph in its adjacency list format (for any vertex only outgoing edges are stored). The output is a topological ordering of the graph. Your program (which should run on CSE machines) should read from the file data 3.txt and write to the file out3.txt. As usual (referring to assignment 1) include a readme file containing all needed information. For this assignment, the input files contain only one graph. Each line of input file starts with name of a vertex followed by name of vertices that are adjacent to that vertex (separated by spaces). Input graphs have at most 50 vertices. Vertices are numbered as consecutive integers. For this assignment you could use STL, you can use STL vectors and strings. Example input 123 23 3 Example output Topological ordering is: 1, 2, 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!