Finished DFS shortest path algorithm for project 5B