1 Define a function breadthFirst, which performs a breadth-first traversal on a graph, given a start vertex. This function should return a list of the labels of the vertices in the order in which they are visited. Test the function thoroughly with the case study program
2 Define a function hasPath, which expects a directed graph and the labels of two vertices as arguments. This function returns True if there is a path between the two vertices, or returns False otherwise. Test this function thoroughly with the case study program.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here