Looking for algorithm finding euler path

后端 未结 5 749
终归单人心
终归单人心 2021-02-05 13:45

I\'m looking for an algorithm to find an Euler path in a graph.

I\'ve seen a good one a couple of weeks ago but I can\'t find it now, I remember there was tagging edges

5条回答
  •  孤独总比滥情好
    2021-02-05 14:10

    Hierholzer's algorithm is a better way to find Euler path in a directed graph.

    http://stones333.blogspot.com/2013/11/find-eulerian-path-in-directed-graph.html

    It has the code plus test cases.

提交回复
热议问题