Visited is required in TreeNode's DFS to handle the event of one node
being the child of more than one other node in the graph.  However,
equals and hashCode overrides aren't necessary because a Node's identity
is sufficient.