There is a bi-directional graph with n vertices, labeled from 0 to n - 1. The edges are represented as a 2D integer array edges, where each edges[i] = [u, v] denotes a bi-directional edge between vertex u and vertex v. No vertex has an edge to itself, and each vertex pair is connected by at most one edge. Given the graph, determine if there is a valid path from a source vertex to a destination vertex.
Click Run to execute sample tests.