Some c++ code of graphs, BFS and DFS