First, choosing a beginning point V and mark it as an already visited one. Then, starting from the V to search for each point W closed to V. If W has not been visited, then taking W as the new beginning to loop the depth first traversal. Until all the reachable vertices from the beginning V have been visited, the loop ends.
If there is still no reachable vertices in this graph, just choosing another vertex which has not been accessed as a new beginning point to repeat the above process until all vertices in the graph have been visited.
Depth first search is a classical algorithm in graph theory. Using DFS can generate the corresponding target topology diagram sorting table which can easily solve many problems related to graph theory, such as the maximum path problem and so on.