python实现有向无环图(DAG)
from collections import OrderedDict, defaultdictfrom copy import copy, deepcopyclass DAG(object): """ Directed acyclic graph implementation. """ def __init__(self): """ Construct a new DAG wit