|
|
|
|
|
by Labo333
1268 days ago
|
|
From a more algorithmic point of view, this is exactly the task of topological sorting [1]. And it runs linearly in the number of edges! I expect Prolog to be slower for large and hard inputs. But Makefiles solve exactly that! [1]: https://en.m.wikipedia.org/wiki/Topological_sorting |
|