Merge Sorted Arrays — JavaScript easy interview problem
You are given two integer arrays `nums1` and `nums2`, sorted in non-decreasing order, and integers `m` and `n` representing the number of elements in each. Merge `nums2` into `nums1` as one sorted array. `nums1` has length `m + n` with trailing zeros as buffer. Return `nums1`.
Tags: two-pointers
Practice this Arrays problem free in the JS Interview Playground with automated tests and unlockable solutions.