KNOW:
BE ABLE TO:
Sample Exam Question:
We said that instead of passing an additional parameter that contains
a list of cities already visited, we could eliminate the cycles from
hasRoute() by including a boolean visited
field for every Node.
Rewrite the hasRoute()
methods in the Node
and
Graph
classes, using the boolean field implementation.