Skip to content

Commit a59a788

Browse files
author
Ankit Agarwal
committed
Added comments regarding node type
1 parent 7682aa8 commit a59a788

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

linkedlist/reverse.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ def reverse_list(head):
2828
# T(n)- O(n)
2929
#
3030
def reverse_list_recursive(head):
31+
"""
32+
:type head: ListNode
33+
:rtype: ListNode
34+
"""
3135
if head is None or head.next is None:
3236
return head
3337
p = head.next

0 commit comments

Comments
 (0)