Problem: Given two arrays, write a function to compute their intersection. 中文:已知两个数组,写一个函数来计算它们的交集 Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2],return [2, 2]. 已知nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2]. Note: Each element in the res…