Source code for EE360C Project 2. Finding a valid connection between 2 nodes using BFS to attain O(m+n) with m edges and n nodes.