Simplify heapreplace() -- there's no need for an explicit test for
empty heap, since heap[0] raises the appropriate IndexError already.
Showing
Please register or sign in to comment
empty heap, since heap[0] raises the appropriate IndexError already.