| Algorithm 1: Explored the nodes by breadth-first technique |
| Input: seed S, node “i”, |
| Visited [i] = 1 already the node to be visited. |
| Visited [i] has initiated to Zero. |
| Output: Get Unexplored Seed |
| { |
| U = S//Q Vertices in the Queue |
| Visited [S] = 1; |
| Repeat |
| { |
| Λ vertices w acting from U do |
| If (visited [w] = 0) then |
| { |
| Add w to q;//w is unexplored |
| Visited [w] = 1; |
| } |
| } |
| If q is empty, then return unexplored vertex; |
| Remove S from Q; |
| }//until Q is not explored. |