We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5fd2ae3 commit 6b39dc3Copy full SHA for 6b39dc3
Python/intersection-of-three-sorted-arrays.py
@@ -38,5 +38,5 @@ def arraysIntersection(self, arr1, arr2, arr3):
38
:type arr3: List[int]
39
:rtype: List[int]
40
"""
41
- intersect = reduce(set.intersection, map(set, [arr1, arr2, arr3]))
+ intersect = reduce(set.intersection, map(set, [arr2, arr3]))
42
return [x for x in arr1 if x in intersect]
0 commit comments