Skip to content
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

Fix mypy errors in circular_linked_list.py and swap_nodes.py #9707

Merged
merged 5 commits into from
Oct 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix mypy errors in swap_nodes.py
  • Loading branch information
tianyizheng02 committed Oct 4, 2023
commit 577e8a81b411c98db1daa64cbe5a1261d7b2e324
4 changes: 2 additions & 2 deletions data_structures/linked_list/swap_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ def __init__(self, data: Any) -> None:

"""
self.data = data
self.next = None # Reference to the next node
self.next: Node | None = None # Reference to the next node


class LinkedList:
def __init__(self) -> None:
"""
Initialize an empty Linked List.
"""
self.head = None # Reference to the head (first node)
self.head: Node | None = None # Reference to the head (first node)

def print_list(self):
"""
Expand Down