Solved step by step with explanation to determine the vertices in the frontierqueue and discoveredset at different iterations of the bfs algorithm.
Solved step by step with explanation to determine the vertices in the frontierQueue and discoveredSet at different iterations of the BFS algorithm
Question
Answer
Solved step by step with explanation to determine the vertices in the frontierQueue and discoveredSet at different iterations of the BFS algorithm.
frontierQueue: [B]
discoveredSet: [B]
frontierQueue: [D, E]
discoveredSet: [B, C, F, D, E]
Vertices in discoveredSet after the third iteration: B, C, F, D, E