input is
[1,2,3,0,0,0]
3
[2,5,6]
3
Code is
def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None:
nums1 = nums1[0:m] + nums2[0:n]
nums1.sort()
print(nums1)
stdout is
[1, 2, 2, 3, 5, 6]
But, array is
[1,2,3,0,0,0]
Why is this the case?
I thought the array would be [1, 2, 2, 3, 5, 6] as well