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 ingoing 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 data4.txt and write to the file out4.txt. As usual (referring to assignment 1) include a read me 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). For this assignment you cannot use any graph structure form STL, but you can use vectors and strings.
Example input
1 3 4
2 1
3
4
5 1 2
Example output
Topological ordering is: 3, 4, 1, 2, 5