Skip to content

Commit 0ef0c35

Browse files
authored
Update Copy List with Random Pointer - Leetcode 138.py
1 parent c81513f commit 0ef0c35

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Copy List with Random Pointer - Leetcode 138.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ def copyRandomList(self, head: "Optional [Node]") -> "Optional [Node]":
2020
curr = curr.next
2121

2222
return old_to_new[head]
23+
24+
# Time Complexity: O(n)
25+
# Space Complexity: O(n)

0 commit comments

Comments
 (0)