Search⌘ K
AI Features

Solution: Find if Path Exists in Graph

Solution: Find if Path Exists in Graph gives a bidirectional graph of numbered vertices and asks whether any valid path connects the source vertex to the destination. Return true or false.

Statement

Given a 2D list, edges,  which represents a bidirectional graph. Each vertex is labeled from 00 to n−1n-1, and each edge in the graph is represented as a pair, ...