Skip to content

Commit dd85464

Browse files
committed
Sync LeetCode submission Runtime - 0 ms (100.00%), Memory - 18.5 MB (15.15%)
1 parent 392d113 commit dd85464

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

0206-reverse-linked-list/solution.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Approach 1: Iterative
2-
2+
33
# Time: O(n)
44
# Space: O(1)
55

@@ -13,12 +13,12 @@ class Solution:
1313
def reverseList(self, head: Optional[ListNode]) -> Optional[ListNode]:
1414
prev = None
1515
curr = head
16-
16+
1717
while curr:
1818
next_temp = curr.next
1919
curr.next = prev
2020
prev = curr
2121
curr = next_temp
22-
22+
2323
return prev
2424

0 commit comments

Comments
 (0)