547.Intersection of Two Arrays
1.Description(Easy)
Given two arrays, write a function to compute their intersection.
Notice
Each element in the result must be unique.
The result can be in any order.
Example
Givennums1=[1, 2, 2, 1]
,nums2=[2, 2]
, return[2]
.
Can you implement it in_three_different algorithms?
2.Code
Last updated