LeetCode 350 Intersection of Two Arrays II 题解
1.题目:
Given two arrays, write a function to compute their intersection.
Example:
Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].
题意:
返回两个数组的公共部分
2.解题思路:
感觉有点暴力
3.代码
1 |
|
很高兴遇见你~
Given two arrays, write a function to compute their intersection.
Example:
Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].
题意:
返回两个数组的公共部分
感觉有点暴力
1 |
|