Skip to content

Felixaverlant/tarjan-SCC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

tarjan-SCC

scala implementation of the Tarjan SCC algorithm based on this one https://github.com/bwesterb/py-tarjan (only the SCC part).

If I have time, i'll try to make more "scala".

Example

Input

tarjan_scc(Map(
  1 -> List(2),    2 -> List(1, 5), 3 -> List(4),
  4 -> List(3, 5), 5 -> List(6),    6 -> List(7),
  7 -> List(8),    8 -> List(6, 9), 9 -> Nil
))

output

ArrayBuffer(
  ArrayBuffer(9), 
  ArrayBuffer(7, 6, 8), 
  ArrayBuffer(5), 
  ArrayBuffer(1, 2), 
  ArrayBuffer(3, 4)
)

About

scala implementation of the Tarjan SCC algorithm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages