LeetCode: Intersection of Two Arrays
Problem:
https://leetcode.com/problems/intersection-of-two-arrays/
Code:
class Solution:
def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]:
result = set()
n2 = set(nums2)
for num in nums1:
...
is-power-of-two.hashnode.dev2 min read