Skip to content

Commit 995e8fd

Browse files
Update doubly_linked_list_two.py
1 parent 1d05c39 commit 995e8fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

data_structures/linked_list/doubly_linked_list_two.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def insert_before_node(self, node: Node, node_to_insert: Node) -> None:
9797
node_to_insert.next = node
9898
node_to_insert.previous = node.previous
9999

100-
if not node.previous:
100+
if node.previous is None:
101101
self.head = node_to_insert
102102
else:
103103
node.previous.next = node_to_insert

0 commit comments

Comments
 (0)