Skip to content

assign-level may take exponential time #10

@pfdietz

Description

@pfdietz

I had a problem with topological-sort hanging, which I traced to the implementation of assign-level. In the worst case this can take exponential time (in the number of vertexes) on a directed acyclic graph.

I have a linear time implementation of topological sort I will be uploading to a branch when I have time. I doesn't use assign-level. Depth can be computed from the topological sort in linear time. Can assign-level be removed from the api?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions