graph/topological_sort_utils library

Topological sort with cycle detection — roadmap #539.

Functions

topologicalSort(Adjacency graph) List<int>?
Returns sorted node indices, or null if cycle detected.