Debugging connected O(n+m) algorithm...