mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-08 06:45:54 +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)
|
||||
"""
|
||||
self.data: int = data
|
||||
self.next_node: Node = None
|
||||
self.next_node: Node | None = None
|
||||
|
||||
def __repr__(self) -> str:
|
||||
"""
|
||||
@ -50,8 +50,8 @@ class SortedLinkedList:
|
||||
True
|
||||
"""
|
||||
self.numNodes: int = 0
|
||||
self.head: Node = None
|
||||
self.tail: Node = None
|
||||
self.head: Node | None = None
|
||||
self.tail: Node | None = None
|
||||
|
||||
def __repr__(self) -> str:
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user