should be the same amount of time from the Receipt Receive date to the date you received it.
k*a
7 楼
你给的链接的时间复杂度是(m+n)log(m+n),不符合题目要求啊
d*k
8 楼
www.americanexpress.com/airlinechoice 在这改
x*i
9 楼
thanks. 一个星期左右?
r*e
10 楼
public class Solution { public double findMedianSortedArrays(int A[], int B[]) { if (A==null||B==null) return 0; int len = A.length+B.length; if ((len&1)>0) return findKth(A,0,B,0,len/2+1); else return findKth(A,0,B,0,len/2)/2.0+findKth(A,0,B,0,len/2+1)/2.0; } private int findKth(int[] A,int a, int[] B,int b,int k){ if (a>=A.length) return B[b+k-1]; if (b>=B.length) return A[a+k-1]; if (k==1) return Math.min(A[a],B[b]);
int median_A = (a+k/2-1int median_B = (b+k/2-1 if (median_A>median_B) return findKth(A,a,B,b+k/2,k-k/2); else return findKth(A,a+k/2,B,b,k-k/2);