Skip to content

node_map in MutableBinaryHeap grows indefinitely #745

Open
@msavael

Description

@msavael

If you push/pop an element in a loop 1 million times, nodes will be empty, but node_map will have length 1 million. It is never emptied. I think there could be better design using a circular buffer that would only ever require node_map to be as long as the maximum size of the heap?

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions