You have two sorted integer arrays nums1 and nums2. Merge nums2 into nums1 in-place so the result is sorted. Array nums1 has enough trailing zeros to hold all elements. Meta phone screens frequently feature this in-place merge to test your pointer manipulation skills.
For example, nums1 = [1,2,3,0,0,0] with m = 3, and nums2 = [2,5,6] with n = 3. After merging: [1,2,2,3,5,6].
Merging from the front overwrites nums1 values you haven't processed yet. What if you filled from the back instead?
Constraints: , nums1.length == m + n.