```
def merge(self, A, m, B, n):
index = m+n-1
while index >= 0:
if m <= 0:
A[index] = B[-n]
n-=1
elif n <= 0:
break
elif A[m-1] < B[n-1]:
A[index] = B[-n]
n-=1
else:
A[index] = A[-m]
m-=1
index -=1
```

OJ said input: [2],[1] output: [1,0]. Could someone please help me figure out where was wrong? Thanks a lot!!