MCPcopy Create free account
hub / github.com/HuberTRoy/leetCode / intersection

Method intersection

Array/IntersectionOfTwoArrays.py:33–40  ·  view source on GitHub ↗

:type nums1: List[int] :type nums2: List[int] :rtype: List[int]

(self, nums1, nums2)

Source from the content-addressed store, hash-verified

31"""
32class Solution(object):
33 def intersection(self, nums1, nums2):
34 """
35 :type nums1: List[int]
36 :type nums2: List[int]
37 :rtype: List[int]
38 """
39
40 return list(set(nums1) & set(nums2))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected