Beginning at the Denver Airport and expanding nodes until you reach the Elitch Gardens (a popular Denver Amusement park) station, perform the following searches:
Breadth First Search
For each of the above search, list the stations (nodes) in the order they are visited in a Work document
explanation:
In breadth first search, we will have a queue to track the nodes visited and which nodes to visit next.
for eg:
1.here root node is Denver airport.
2.after traversing that node, we have to check for its adjacent nodes.
3.after traversing adjacent nodes we have to dequeue the previous node.
4.now that adjacent nodes will become root nodes.
5.now go to step 2
6.similarly we have to traverse all nodes until we reach our destination.
7.after reaching our destination, we can terminate our program.
Beginning at the Denver Airport and expanding nodes until you reach the Elitch Gardens (a popular...