#23 Topological sorting for a DAG represented by an adjacency list