Introduction - If you have any usage issues, please Google them yourself
Figure traverse the depth and breadth of First create a non-directed graph, vertex with a one-dimensional array to store the arc with a two-dimensional array to store non-adjacent vertices between the infinite set. Boolean function, set deep traversal vertices visited vertex boolean value true recursive call DFS function. Breadth traversal, combined with the queue storage traversal.