Skip to content

Commit 4ccbc6b

Browse files
Add missing newlines to improve code readability
Inserted blank lines in the code to enhance readability and adhere to Python's style guidelines. These changes improve the visual clarity of the class and function definitions.
1 parent e67bb1c commit 4ccbc6b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Linked Lists/remove_node_from_end_of_linked_list.py

+3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44

55
import unittest
66

7+
78
class ListNode:
89
def __init__(self, val=0, next=None):
910
self.val = val
1011
self.next = next
1112

13+
1214
def remove_nth_from_end(head: Optional[ListNode], n: int) -> Optional[ListNode]:
1315
def get_length(head: Optional[ListNode]):
1416
length: int = 0
@@ -46,6 +48,7 @@ def get_length(head: Optional[ListNode]):
4648

4749
return head
4850

51+
4952
class Test(unittest.TestCase):
5053
def test_example(self):
5154
# Create the linked list 1 -> 2 -> 3 -> 4 -> 5

0 commit comments

Comments
 (0)