1971. Find if Path Exists in Graph
Last updated
Last updated
**Input:** n = 3, edges = [[0,1],[1,2],[2,0]], start = 0, end = 2
**Output:** true
**Explanation:** There are two paths from vertex 0 to vertex 2:
- 0 → 1 → 2
- 0 → 2**Input:** n = 6, edges = [[0,1],[0,2],[3,5],[5,4],[4,3]], start = 0, end = 5
**Output:** false
**Explanation:** There is no path from vertex 0 to vertex 5.