Skip to content

Instantly share code, notes, and snippets.

@Wlodarski
Wlodarski / cpm.py
Created May 21, 2017 00:26
Finding the Critical Path with Topological Sorting
#! python3
import networkx as nx
class CPM(nx.DiGraph):
def __init__(self):
super().__init__()
self._dirty = True
self._critical_path_length = -1