Programming exercise from Ensoft which used bfs of graph to get all the nodes from a set of start nodes to a set of end nodes