Skip to main content
. 2022 Mar 23;19(7):3791. doi: 10.3390/ijerph19073791
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.