Tarjan’s strongly connected components algorithm in Scala

January 2nd, 2013

Recently I have been researching a matching algorithm for a certain sector of a swap market. This turned into a graph problem requiring finding strongly connected components of the graph (and then cycles) to generate possible multi-broker trades. I turned to Wikipedia for help and found this nice Tarjan’s algorithm:

Read the whole story…

Comments are closed.