...
/Challenge: Check If a Path Exists between Two Vertices
Challenge: Check If a Path Exists between Two Vertices
Try to solve the Check If a Path Exists between Two Vertices problem.
We'll cover the following...
Statement
Given a 2D array, edges
, representing a bidirectional graph, where 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
Examples
Access this course and 1400+ top-rated courses and projects.