Changes BFS and DFS to account for 0-indexing.
The results will output assuming that the vertices start from 1.