Update remove_elements.py

This commit is contained in:
marina 2023-08-02 19:10:37 -07:00 committed by GitHub
parent 2c1c7c0ff7
commit 57ddd32859
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@
def remove_elements(head, val):
sentinel = ListNode(0)
sentinel = Node(0)
sentinel.next = head
prev, current = sentinel, head