Skip to content

Duplicate Backedges for both DFS and BFS #14

Description

@ProfessorAtomicManiac

This was intentional since the graphs were assumed to be directed, however, there are duplicate back-edges. You could avoid this by giving an "order" to the nodes you visited, where the first node is "0", the second node you visit is "1", and so on. If you detect a back-edge, it should be 2 -> (any value less than 2) which indicates that it is going backward. If it is 0 -> (Any value more than 0), it indicates that it is going forward and should not be a back-edge.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfixThis will not be worked on

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions