Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node_map in MutableBinaryHeap grows indefinitely #745

Open
msavael opened this issue Jun 24, 2021 · 0 comments · May be fixed by #807
Open

node_map in MutableBinaryHeap grows indefinitely #745

msavael opened this issue Jun 24, 2021 · 0 comments · May be fixed by #807

Comments

@msavael
Copy link

msavael commented Jun 24, 2021

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?

ancapdev added a commit to ancapdev/DataStructures.jl that referenced this issue Apr 23, 2022
@ancapdev ancapdev linked a pull request Apr 23, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant