Introduction - If you have any usage issues, please Google them yourself
Graph traversal:
(1) Access the initial vertex v and marked vertex v visited.
(2) Find the first vertex v adjacent vertices w.
(3) If the vertex v of adjacent vertices w exist, continue otherwise go back to v, v to find another one unvisited neighbor.
(4) If the vertex w has not been accessed, the access vertices w and marked as visited vertex w.
(5) continues to find the next vertex adjacent vertices w wi, wi If v is the value to the step (3). Until all connected graphs all vertices visited so far.
(A) vertex v into the queue.
(2) When the queue is not empty, then continue, otherwise the algorithm terminates.
(3) the head of the queue to obtain team points v visit vertex v and marked vertex v has been visited.
(4) Find the first vertex v adjacent vertices col.
(5) If v is adjacent vertices col unvisited, then col into the queue.
(6) continue to find another new vertex v adjacent vertices col, go to step (5). Until all vertices v adjacent unvisited point processed. G