median of two sorted arrays
摘要:
1 double findKth(int a[], int m, int b[], int n, int k) 2 { 3 //always assume that m is equal or smaller than n 4 if (m > n) 5 return findKth(b, n, a, m, k); 6 if (m == 0) 7 return b[k - 1]; 8 if (k == 1) 9 return min(a[0], b[0]);10 //divide k into two pa... 阅读全文
posted @ 2013-09-06 19:54 jumping_grass 阅读(158) 评论(0) 推荐(0)
浙公网安备 33010602011771号