Merge pull request #252 from alouhaha/patch-1

Update singly_linked_list.py
This commit is contained in:
wangzheng0822 2019-03-01 09:56:41 +08:00 committed by GitHub
commit 0c71e0e676
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,7 @@ class SinglyLinkedList:
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: