Graph serialization

后端 未结 4 1855
甜味超标
甜味超标 2020-12-13 05:55

I\'m looking for a simple algorithm to \'serialize\' a directed graph. In particular I\'ve got a set of files with interdependencies on their execution order, and I want to

4条回答
  •  心在旅途
    2020-12-13 06:57

    If the graph contains cycles, how can there exist allowed execution orders for your files? It seems to me that if the graph contains cycles, then you have no solution, and this is reported correctly by the above algorithm.

提交回复
热议问题