1.2 Starting from node A apply BFS algorithm. 같 :@ Show transcribed image text 1.2 Starting from node A apply BFS algorithm. 같 :@
Answer
BFS pseudo code:-
BFS(v)
{
Visited[v] = 1
add(v,Q)// Q is queue
while (Q is not empty)
{
x = delete(Q)
printf(x)
for all w adjacent to x
{
if(w is not visited)
{
visited[w] = 1
add(w,Q)
}
}
}
Applying above algorithm we get:-
Delete B y Delete D y Delete C Delete E Delete-G lDelete H Delete. F
OR
OR