Given `n` nodes, an undirected `edges` list, a `src`, and a `dst`, implement `hasPath(n, edges, src, dst)` returning whether a path exists from `src` to `dst`.
+ 1 hidden test run on Submit.
DFS or BFS from the source reaches the destination if a path exists. O(V + E) time.
Run your code to see results.