Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 3x 9x 3x 3x 3x | export default function merge(
nums1: number[],
m: number,
nums2: number[],
n: number,
): number[] {
const sortedNums = nums1
.slice(0, m)
.concat(nums2.slice(0, n))
.sort((a, b) => a - b)
nums1.splice(0)
nums1.push(...sortedNums)
return nums1
}
|