← 返回 meta 的题目列表Merge Three Sorted Arrays
类型:online_judge
Implement a function to merge three sorted integer arrays into a single sorted integer array. The output should consist of all integers from the three input arrays with no duplicates. Function signature mergeThreeArrays(arr1: List[int], arr2: List[int], arr3: List[int]) -> List[int].
Input:
arr1: First sorted integer array.
arr2: Second sorted integer array.
arr3: Third sorted integer array.
Output:
Return a merged sorted integer array without duplicates.
Example:
Input: arr1 = [-1, -1, 0, 1], arr2 = [-2, 3, 5], arr3 = [-1, 0, 5]
Output: [-2, -1, 0, 1, 3, 5]
Example
Input
([-1,0,1], [2,3], [-3,0,2,4])