I'm seeing this:
Input:  0  1 Output: [0,1] Expected: 
Why would the initial argument () have a length of 0? It's not an empty list.
Zero is the size of the first numbers to sort, the size of the first array is in fact N+M, which 0+1 = 1, which is valid.
I still don't understand. If the input for num1 is , that's an array of length 1. So m should equal 1. It seems to me it should be:
with an expected output of [0,1]
Hope you can clarify for me.
I think  is place holder.
num1 = [ 0,0,0,0,0], m = 0; num2 = [1,2,3,4,5], size = 5;
Although m = 0, num1 's size should still be m+n = 5 because it will hold the merged array. So num1 should have 5 elements, and all the initial values should be 0.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.