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))