merge sorted arrays
2022年5月1日小于 1 分钟
merge sorted arrays
Question
You are given a list of sorted non-descending integer arrays, write a function to merge them into one sorted non-descending array.
merge(
[
[1,1,1,100,1000,10000],
[1,2,2,2,200,200,1000],
[1000000,10000001],
[2,3,3]
]
)
// [1,1,1,1,2,2,2,2,3,3,100,200,200,1000,1000,10000,1000000,10000001]
What is time complexity of your solution?
Code
/**
* @param {number[][]} arrList
* non-descending integer array
* @return {number[]}
*/
function merge(arrList) {
// your code here
}