Built a sample graph datastructure, check if path exists between 2 nodes