Problems > Is There a Route > Editorial

Is There a Route — Solution & Editorial

Back to the Problem

One BFS/DFS from S; check whether T gets visited.

Complexity: O(N + M)