Skip to content

Commit

Permalink
Update singly_linked_list.py
Browse files Browse the repository at this point in the history
current._next = node._next in delete_by_node
  • Loading branch information
alouhaha authored Feb 26, 2019
1 parent 8f59dd8 commit 01a1083
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/06_linkedlist/singly_linked_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def delete_by_node(self, node: Node):
current = current._next
if not current: # node not in the list
return
current._next = None
current._next = node._next

def delete_by_value(self, value: int):
if not self._head or not value:
Expand Down

0 comments on commit 01a1083

Please sign in to comment.