NumPy allowed · plain Python earns 10 bonus points
Determine graph reachability between two vertices using BFS or DFS traversal.
Implement valid_path_exists(n, edges, source, destination): construct an adjacency list and use BFS with a visited set to determine if destination is reachable from source.
valid_path_exists(n: int, edges: list[list[int]], source: int, destination: int) -> bool