Array
88. Merge Sorted Array
The trap is merging left-to-right: writing into the front of nums1 would overwrite elements you haven't placed yet, forcing shifts. Merge from the back instead — the empty tail of nums1 is exactly…
Loading…
The trap is merging left-to-right: writing into the front of nums1 would overwrite elements you haven't placed yet, forcing shifts. Merge from the back instead — the empty tail of nums1 is exactly…
Loading…