Consequences of BFS
Can determine if there is a path from v to w in O(n+e). How?
Run BFS( v).
If Encountered(w) is true, then there is a path. Otherwise, there isn’t.
Previous slide
Next slide
Back to first slide
View graphic version