debuging some error of graphMatrix(need more correction);
Calculating the time of the BFS and DFS;