mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-20 12:47:35 +00:00
"Updated type hints for Node and SortedLinkedList attributes to include None option"
This commit is contained in:
parent
13600242ca
commit
d96cc64ce7
@ -24,7 +24,7 @@ class Node:
|
|||||||
Node(None)
|
Node(None)
|
||||||
"""
|
"""
|
||||||
self.data: int = data
|
self.data: int = data
|
||||||
self.next_node: Node = None
|
self.next_node: Node | None = None
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
"""
|
"""
|
||||||
@ -50,8 +50,8 @@ class SortedLinkedList:
|
|||||||
True
|
True
|
||||||
"""
|
"""
|
||||||
self.numNodes: int = 0
|
self.numNodes: int = 0
|
||||||
self.head: Node = None
|
self.head: Node | None = None
|
||||||
self.tail: Node = None
|
self.tail: Node | None = None
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user