You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sprint-1/Python/find_common_items/find_common_items.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,9 @@ def find_common_items(
9
9
"""
10
10
Find common items between two arrays.
11
11
12
-
Time Complexity: The time complexity is O(n + m) because we build a set from the second sequence in O(m) time and iterate through the first sequence in O(n) time.
13
-
Space Complexity: The space complexity is O(n + m) because we store up to all elements of the second sequence in a set and up to the common elements in additional storage.
14
-
Optimal time complexity: The time complexity is O(n + m) and the space complexity is O(n + m).
12
+
Time Complexity: The time complexity is O(n + m)
13
+
Space Complexity: The space complexity is O(n + m)
14
+
Optimal time complexity: The time complexity is O(n + m)
0 commit comments