We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c862ad commit e75cdd4Copy full SHA for e75cdd4
1 file changed
reverse-linked-list/jylee2033.py
@@ -22,3 +22,6 @@ def reverseList(self, head: Optional[ListNode]) -> Optional[ListNode]:
22
# Handle the last node
23
cur.next = prev
24
return cur
25
+
26
+# Time Complexity: O(n)
27
+# Space Complexity: O(1)
0 commit comments