Skip to content

Commit a628d8a

Browse files
committed
linked list fixes
1 parent 202c582 commit a628d8a

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

Sprint-2/implement_linked_list/linked_list.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,4 @@ def remove(self, id_for_this_particular_item):
5454
def pop_tail(self):
5555
if not self.tail:
5656
return None
57-
58-
old_tail = self.tail
59-
if old_tail.prev:
60-
self.tail = old_tail.prev
61-
self.tail.next = None
62-
else:
63-
self.head = self.tail = None
64-
65-
return old_tail.inserted_item_key
66-
57+
return self.remove(self.tail)

0 commit comments

Comments
 (0)