Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ad679f commit 6681de2Copy full SHA for 6681de2
1 file changed
Lib/heapq.py
@@ -233,7 +233,7 @@ def _siftup(heap, pos):
233
while childpos < endpos:
234
# Set childpos to index of smaller child.
235
rightpos = childpos + 1
236
- if rightpos < endpos and heap[rightpos] < heap[childpos]:
+ if rightpos < endpos and heap[rightpos] <= heap[childpos]:
237
childpos = rightpos
238
# Move the smaller child up.
239
heap[pos] = heap[childpos]
0 commit comments