Extract BFS and DFS from Graph into the algorithm package.
Extract BFS and DFS from Graph into the algorithm package.