Skip to content

Commit 425459b

Browse files
committed
add complexity
1 parent 22ff96c commit 425459b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

merge-two-sorted-lists/jylee2033.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ def mergeTwoLists(self, list1: Optional[ListNode], list2: Optional[ListNode]) ->
2525
cur.next = list1 or list2
2626

2727
return output.next
28+
29+
# Time Complexity : O(n + m), n - lenght of list1, m - length of list2
30+
# Space Complexity : O(1)

0 commit comments

Comments
 (0)