def bfs(graph,source,target): # Initialize "visited" nodes. # Initialize "frontier" ("to do list") with source. # while there are nodes in the frontier/todo list # if this node has been visited, we're done with this node. # add node to visited nodes # is this the node you are looking for? If so, return it. # get the edges from this node # Add these nodes to the end of the frontier/todo list # return value indicating that target wasn't found