First, the merge method doesn't return anything, it will check the array A. So u need to understand the problem a little bit clearer.

A is array sorted from index 0 to m (exclusive), B is sorted from 0 to n. A might have more elements after the index m. In your test case, A = [0] , not [].B=[1].

Second, ur method run in nlogn (using sort).

You can refer to the below code for improvement.

```
class Solution:
# @param A a list of integers
# @param m an integer, length of A
# @param B a list of integers
# @param n an integer, length of B
# @return nothing
def merge(self, A, m, B, n):
#we merge from the end of array A
l = m+n - 1 #last element
m = m-1
n = n-1
while(m>=0 and n>=0):
if(A[m] > B[n]):
A[l] = A[m]
m = m-1
else:
A[l] = B[n]
n = n-1
l = l - 1
#don't need to do this for m
while(n>=0):
A[l] = B[n];
n = n-1
l = l-1
```