thiagowfx's avatar

¬ just serendipity 🍀 (not just serendipity)

LeetCode #349: Intersection of Two Arrays

• 21 words • 1 min • updated

LeetCode #349: Intersection of Two Arrays:

python
class Solution:
    def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]:
        return list(set(nums1) & set(nums2))