Functional implementation of Tarjan's Strongly Connected Components algorithm

后端 未结 3 1457
粉色の甜心
粉色の甜心 2021-01-31 00:05

I went ahead and implemented the textbook version of Tarjan\'s SCC algorithm in Scala. However, I dislike the code - it is very imperative/procedural with lots of mutating state

3条回答
  •  情话喂你
    2021-01-31 00:25

    See Lazy Depth-First Search and Linear Graph Algorithms in Haskell by David King and John Launchbury. It describes many graph algorithms in a functional style, including SCC.

提交回复
热议问题