This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def topological_sort_nx(files): | |
graphs = nx.DiGraph() | |
for file in files: | |
graphs.add_node(file) | |
for fileA in files: | |
for fileB in files: | |
if has_dependency(fileA, fileB): | |
graphs.add_edge(fileB, fileA) |
OlderNewer