← 返回 netflix 的题目列表Unique Intersection of Two Integer Arrays
类型:online_judge
netflix
First Question
Given two integer arrays A and B, return their intersection. Each element in the result must be unique and appear in both arrays. You may return the result in any order.
Input Format:
Two integer arrays A and B.
Output Format:
The intersection array.
Example:
Input:
A = [1,2,2,1]
B = [2,2]
Output:
[2]
Example
Input
A = [1,2,2,1]
B = [2,2]