Created
June 19, 2022 02:35
-
-
Save wanderindev/bf60f2961ab57eb9538e3a4cea4d21c7 to your computer and use it in GitHub Desktop.
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
def remove(self, node_data: Any) -> None: | |
"""Remove the first node whose data is node_data""" | |
if not self.is_empty(): | |
prev_node = self.get_prev_node(node_data) | |
prev_node.next_node = prev_node.next_node.next_node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment