# # Known l1,l2 are ascending arrays,
# # to find the nth digit in the two array l1,l2,
# # Two The median of the array is greater than the latter, which means that the members below the median number must be below the true median
# # can be removed, the two array after the elimination of a element to find the first n-a, equivalent to
def findmid (L1,L2):
M,n=len (L1), Len (L2)
if (m+n)%2==0:
Return (Listrec (L1,L2, (m+n)/2) +listrec (L1,L2, (m+n)/2)/2
Else
Return Listrec (L1,L2, (m+n+1)/2)
# # LA length greater than or equal to LB
def listrec (la,lb,i):
M,n=len (LA), Len (LB)
If n==0:
return La[i-1]
If M<n:
Return Listrec (Lb,la,i)
If i==1:
return min (la[0],lb[0])
P=min (int (I/2), N)
Print (M,N,I,P)
If LA[P-1]>LB[-1]:
Return Listrec (LA,LB[P:],I-P)
Else
Return Listrec (LA[P:],LB,I-P)
Lm=[x for x in range (13,200) if x%2==0]
Ln=[x for x in range (15,99) if x%2==1]
Print (Findmid (LM,LN))
Leetcode python 004