From 74c64d0fba6de871d4100ef7b2f948fddd21474e Mon Sep 17 00:00:00 2001 From: Kimbobae1 <145372689+Kimbobae1@users.noreply.github.com> Date: Mon, 11 Mar 2024 17:00:31 +0900 Subject: [PATCH] Update priority_queue.py --- priority_queue.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/priority_queue.py b/priority_queue.py index 9a0087b..51d0000 100644 --- a/priority_queue.py +++ b/priority_queue.py @@ -12,10 +12,10 @@ def pop(self): self._swap(0, len(self.heap) - 1) item = self.heap.pop() self._sift_down(0) - return item + return item[1] elif len(self.heap) == 1: item = self.heap.pop() - return item + return item[1] else: return None