DFS, BFS in graph.hpp