refer to other's code and reimplement the algorithm,have a deeper understanding of DFS algorithm in the graph