Given a 2D list, edges, which represents a bidirectional graph. Each vertex is labeled from
Determine whether a valid path exists from the source vertex to the destination vertex. If it exists, return TRUE; otherwise, return FALSE.
Constraints:
n
edges.length
edges[i].length
source, destination
There are no duplicate edges.
There are no self-edges.
Given a 2D list, edges, which represents a bidirectional graph. Each vertex is labeled from
Determine whether a valid path exists from the source vertex to the destination vertex. If it exists, return TRUE; otherwise, return FALSE.
Constraints:
n
edges.length
edges[i].length
source, destination
There are no duplicate edges.
There are no self-edges.