Skip to content

Commit fadbe73

Browse files
committed
refactoring
1 parent 95d06d9 commit fadbe73

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: data_structures/linked_list/remove_nth_node_from_end.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
class Node():
2-
1+
class Node:
32
def __init__(self, val):
43
self.val = val
54
self.next = None
@@ -21,12 +20,14 @@ def remove(head, n):
2120

2221
return extra.next
2322

23+
2424
def print_list(head):
2525
curr = head
2626
while curr:
2727
print(curr.val, end=" ")
2828
curr = curr.next
2929

30+
3031
head = Node(1)
3132
head.next = Node(2)
3233
head.next.next = Node(3)

0 commit comments

Comments
 (0)