Check solution
check_solution: checks for solution being connected and a subgraph of the input graph