Skip to content

Commit 69d651d

Browse files
Implement doubly-linked list with O(1) operations
1 parent d13b59e commit 69d651d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sprint-2/implement_linked_list/linked_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ def __init__(self):
1212

1313
def push_head(self, value):
1414
new_node = Node(value)
15-
1615
if self.head is None:
1716
self.head = new_node
1817
self.tail = new_node
@@ -24,6 +23,7 @@ def push_head(self, value):
2423
return new_node
2524

2625
def pop_tail(self):
26+
2727
if self.tail is None:
2828
raise IndexError("pop_tail from empty linked list")
2929

0 commit comments

Comments
 (0)