LeetCode #349: Intersection of Two Arrays
β’ 21 words β’ 1 min
β’ updated
LeetCode #349: Intersection of Two Arrays:
class Solution:
def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]:
return list(set(nums1) & set(nums2))
Related Posts
LeetCode #350: Intersection of Two Arrays II:
python from collections import Counter class Solution: def intersect(self, nums1: List[int], nums2: β¦
Jan 06, 2026
LeetCode #2215: Find the Difference of Two Arrays:
python class Solution: def findDifference(self, nums1: List[int], nums2: List[int]) -> β¦
Jan 06, 2026
Previously, previously, previously, previously, previously.
Thiago Perrotta