Skip to content

doubly linked list: add dataclass and typing #12647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Apr 1, 2025
Prev Previous commit
Next Next commit
Update doubly_linked_list_two.py
  • Loading branch information
MaximSmolskiy authored Apr 1, 2025
commit d6b89e883ecdb6567149172dac8c54f892196e10
2 changes: 1 addition & 1 deletion data_structures/linked_list/doubly_linked_list_two.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def insert_before_node(self, node: Node, node_to_insert: Node) -> None:

node.previous = node_to_insert

def insert_after_node(self, node: Node, node_to_insert: Node) -> None:
def insert_after_node(self, node: Node | None, node_to_insert: Node) -> None:
node_to_insert.previous = node
node_to_insert.next = node.next

Expand Down