본문 바로가기

IT/코딩테스트

[Leetcode] 349. Intersection of Two Arrays

728x90

https://leetcode.com/problems/intersection-of-two-arrays

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