← Amazon questions

Merge two sorted arrays into the second array

Filed under Amazon

You are given two sorted arrays: nums1 of size m and nums2 of size m + n, where nums2 contains only m elements in its first m positions and n empty slots at the end. Merge nums1 into nums2 as one…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.