Skip to content

Commit 5068d25

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b6d860f commit 5068d25

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎data_structures/linked_list/sorted_linked_list.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class Node:
1616
>>> Node(1, Node(2, Node(3)))
1717
Node(data=1, next=Node(data=2, next=Node(data=3, next=None)))
1818
"""
19+
1920
data: int
2021
next: Node | None = None
2122

@@ -42,6 +43,7 @@ def iter_linked_list(head: Node | None) -> Iterable[Node]:
4243
yield current.data
4344
current = current.next
4445

46+
4547
class SortedLinkedList:
4648
"""This class represents a sorted linked list."""
4749

@@ -57,7 +59,7 @@ def __init__(self) -> None:
5759

5860
def __iter__(self) -> Iterator[int]:
5961
"""Iterate over the data of the nodes in the linked list.
60-
62+
6163
>>> linked_list = SortedLinkedList()
6264
>>> linked_list.insert(3)
6365
>>> linked_list.insert(1)

0 commit comments

Comments
 (0)