Search
⌘K

Leetcode 88. Merge Sorted Array

Given two sorted arrays nums1 and nums2 and counts m and n (nums1 has length m+n with its last n slots free), merge the elements into nums1 in non-decreasing order in-place. Aim for an O(m + n) solution that uses the available buffer rather than returning a new array.

Asked at:

Meta

Amazon

Amazon

Squarespace

Microsoft

Microsoft


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Early November, 2025

Meta

Mid-level

Mid October, 2025

Meta

Manager

Early October, 2025

Meta

Senior

Comments

Your account is free and you can post anonymously if you choose.