Graph Search Algorithms in Scala