Skip to content

topologicalSort produces invalid results for graphs with cycles #41

@notmatthancock

Description

@notmatthancock

Performing a topological sort on a graph with cycles should throw an error (related: #32).

Currently, you can do:

g = Graph()
g.addEdge('a', 'b').addEdge('b', 'a').topologicalSort()
// => [ 'a', 'b' ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions