(graph)
return order
Topological sorting.

    @attention: Topological sorting is meaningful only for directed acyclic graphs.

    @type  graph: digraph
    @param graph: Graph.

    @rtype:  list
    @return: Topological sorting for the graph.
Topological sorting.
Topological sorting .
def topological_sorting(graph):
    """
    Topological sorting.

    @attention: Topological sorting is meaningful only for directed acyclic graphs.

    @type  graph: digraph
    @param graph: Graph.

    @rtype:  list
    @return: Topological sorting for the graph.
    """
    # The topological sorting of a DAG is equivalent to its reverse postordering.
    order = depth_first_search(graph)[2]
    order.reverse()
    return order
def topological_sorting ( graph ) : # The topological sorting of a DAG is equivalent to its reverse postordering. order = depth_first_search ( graph ) [ 2 ] order . reverse ( ) return order