-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Add example of minheap and maxheap working together #137251
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
Conversation
|
This can be put under issue #133530 |
StanFromIreland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Just one little PEP8/257 nit
Though related, there is no benefit to connecting these. The other issue is about a separate part of the heapq docs and is mostly stylistic. |
|
Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
(cherry picked from commit dc05d47) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
|
GH-137255 is a backport of this pull request to the 3.14 branch. |
|
Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
|
GH-143780 is a backport of this pull request to the 3.14 branch. |
(cherry picked from commit dc05d47) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
In Python 3.14, max-heaps were added to the
heapqmodule. Add a classic example of a min-heap and max-heap working together.📚 Documentation preview 📚: https://cpython-previews--137251.org.readthedocs.build/