Created
March 26, 2022 03:00
-
-
Save ericness/eb6eb945936428ebaad1d63a30c993f6 to your computer and use it in GitHub Desktop.
19 two pass solution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if current == head and node_to_remove == 0: | |
head = current.next | |
elif current.next: | |
current.next = current.next.next | |
else: | |
current.next = None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment