This is an assignment where Graph.h / Graph.cpp & GraphTest.cpp were given by professor:
- Build the Graph: undirected/ undirected weighted / directed / directed weighted
- Build a dot file for pictorial representation of this graph
- Traverse the graph using DFS, to find the topological graph & detect cycle if present
Following are the files I have added or edited:
- GraphBuilder.h & GraphBuilder.cpp : This will create nodes & edges to build a graph
- GraphDot.h & GraphDot.cpp : This will write the edges into a dot file that can be later converted to pdf file to display the graph
- GraphDfs.h & GraphDfs.cpp : Depth First Search(DFS), to find the topological order and any loops if present
- Added few function to util.h & util.cpp
Refer the pdf files to see the output of Graphs & DFS (the dot files once generated need to be converted to pdf files using the command)