LeetCode 349 Intersection of Two Arrays

LeetCode 349 Intersection of Two Arrays Problem

Download Code
class Solution(object):
    def intersection(self, nums1, nums2):
        """
        :type nums1: List[int]
        :type nums2: List[int]
        :rtype: List[int]
        """
        # set
        return list(set(nums1) & set(nums2))
Download Intersection of Two Arrays.py

List of all Intersection of Two Arrays problems

Leetcode 349 Intersection of Two Arrays problem solution in python3 with explanation. This is the best place to expand your knowledge and get prepared for your next interview.

Feedback is the most important part of any website.

If you have any query, suggestion or feedback, Please feel free to contact us.