Algorithms.Graph.BFS
Description
bfs :: Foldable f => Int -> Vector (v, f Int) -> Tree v Source #
Runs a BFS from the first vertex in the graph. The graph is given in adjacency list representation.
running time: \(O(V + E)\)
bfs' :: Foldable f => Int -> Vector (f Int) -> Tree Int Source #