INPUT: undirected graph, s, t
OUTPUT: connectivity of s and t
I perform BFS on s AND t, each taking turns to make one traversal.
When a vertex exists in both s and t's BFS tree, we can assume it is connected.
When one tree is done traversing but the other is not, s and t are not connected.
Does such an algorithm exist or am I making stuff up?