Redid bfs and dfs on graph for no particular reason; just to remember how