Java Visitor Pattern

  • + 0 comments

    This approach is overly complicated. Use a simple undirected graph implemented as a directed graph with edges in both directions. Then use standart DFS, and terminate when the vortex has only one neighbour.