mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-29 12:16:14 -04:00
Update intersection_two_arrays.py
This commit is contained in:
parent
2fe4c94c7f
commit
2d0842019d
@ -10,7 +10,7 @@ def intersect(nums1: list[int], nums2: list[int]) -> list[int]:
|
||||
counter = Counter(nums1) & Counter(nums2)
|
||||
|
||||
for n in set_nums:
|
||||
result.extend([n]*counter[n])
|
||||
result.extend([n] * counter[n])
|
||||
|
||||
return result
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user