← Microsoft questions

Merge two sorted arrays in-place in linear time

Filed under Microsoft

Given two sorted arrays nums1 and nums2, where nums1 has enough extra space at the end to hold all elements of nums2, merge nums2 into nums1 in-place.

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 Microsoft questions

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