AdjList: Added a check for DAG's and get a topological sort, if possible