Adobe Interview Question

Traverse a directed graph with cycle, without having to implement hashcode() or equals() in the node class.