Merge Two Sorted Arrays In Place

easy
Unit 4 · Sorting & Two Pointers0/3 to milestone

nums1 has length m + n: its first m elements are sorted and the last n are placeholders. Merge the sorted list nums2 (length n) into nums1 in place so nums1 is fully sorted.

Fill from the back so you never overwrite values you still need.

#two-pointers#sorting2 visible + 1 hidden tests
solution.py · Python 3.13
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Merge Two Sorted Arrays In Place · TechGradify