August 28, 2024
P88 - Connected components.
Write a function that splits a graph into its connected components.
scala
scala> Graph.fromString("[a-b, c]").splitGraph
res0: List[Graph[String,Unit]] = List([a-b], [c])
August 28, 2024
Write a function that splits a graph into its connected components.
scala
scala> Graph.fromString("[a-b, c]").splitGraph
res0: List[Graph[String,Unit]] = List([a-b], [c])
Don't have an account? We will create one for you.
Enter the OTP send to
in seconds.