mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 18:49:26 +08:00
Fix mypy errors in circular_linked_list.py and swap_nodes.py (#9707)
* updating DIRECTORY.md * Fix mypy errors in circular_linked_list.py * Fix mypy errors in swap_nodes.py --------- Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -11,7 +11,7 @@ class Node:
|
||||
|
||||
"""
|
||||
self.data = data
|
||||
self.next = None # Reference to the next node
|
||||
self.next: Node | None = None # Reference to the next node
|
||||
|
||||
|
||||
class LinkedList:
|
||||
@ -19,7 +19,7 @@ class LinkedList:
|
||||
"""
|
||||
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):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user