← 返回 meta 的题目列表Implement Modified Intersection
类型:online_judge
Write a function that takes two integer arrays as input and returns their union instead of the intersection. Test cases include: [1, 2, 3], [2, 3, 4] should return [1, 2, 3, 4]; [5, 6], [5, 6] should return [5, 6]. Note: The elements in the result array must be unique, and they can be returned in any order. The length of each input array will not exceed 1000.
Example
Input
1 2 3
2 3 4