摘要:
#!/usr/bin/env python3.3# -*- coding:utf-8 -*-# Copyright 2013def topological_sort(graph, graph_size): topo_list = [] indegree = {v: 0 for v in range(graph_size)} # 初始化每个顶点的入度 for u in range(graph_size): for v in range(graph_size): if graph[u][v] is not None: ... 阅读全文