#
#
# @param A int整型一维数组
# @param B int整型一维数组
# @return void
#
class Solution:
def merge(self , A, m, B, n):
# write code here
i = m - 1
j = n - 1
flag = m + n - 1
while i>=0 and j>=0:
if A[i] > B[j]:
A[flag] = A[i]
i -= 1
else:
A[flag] = B[j]
j -= 1
flag -= 1
if i == -1:
A[:flag+1] = B[:j+1]
if j == -1:
A[:flag+1] = A[:i+1]