how to use "heapq" module as a max-heap?
Apollo
tjuhzj at qq.com
Sun Mar 29 03:36:00 EDT 2009
as we all known, in the standard module 'heapq', we can easily get the smallest item from the heap. i.e. it's an implementation of min-heap.
my question is how to use 'heapq' to extract the biggest item from the heap? is it possible?
thanks in advance.:)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090329/9d7c2ace/attachment.html>
More information about the Python-list
mailing list