Skip to content

Commit

Permalink
Update priority_queue.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ddangcong80 authored Mar 17, 2024
1 parent de0a3c0 commit 8d9662c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion priority_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def push(self, item, priority):
def pop(self):
if len(self.heap) > 1:
self._swap(0, len(self.heap) - 1)
priority, item = self.heap.pop()
_, item = self.heap.pop()
self._sift_down(0)
return item
elif len(self.heap) == 1:
Expand Down

0 comments on commit 8d9662c

Please sign in to comment.