so they withheld your taxes, but they keep in their pocket and not paying to IRS? Is there a client company you work for? client will have contractor's tax info. Or if cleint/contractor/you all cash payments under the table, of course there will be no tax info generated.
so they withheld your taxes, but they keep in their pocket and not paying to IRS? Is there a client company you work for? client will have contractor's tax info. Or if cleint/contractor/you all cash payments under the table, of course there will be no tax info generated.
Q*e
21 楼
It can be log(m+n). I can not remember clearly. The basic idea is suppose array1 = left1[..], median1, right1[...] suppose array2 = left2[..], median2, right2[...] we compare meidan1 and median 2, if meidan1 < median 2 then array1 = right[1], median1 = find_median(array1 ); // array array2 = left[2], median2 = find_median(array2 ); Repeat until you have two elements left. This is your median. Maybe some details missing here.
s*n
22 楼
谢谢您的回复~这个公司是个很不正规的骗子公司。他没有payrol,没有任何扣税信息 。不是cash payments,他每个月就固定往我账上打2000美元。有client,但是client pay都是corp to corp. 真是被这个骗子骗得好惨。。。
to
【在 c**2 的大作中提到】 : so they withheld your taxes, but they keep in their pocket and not paying to : IRS? Is there a client company you work for? client will have : contractor's tax info. : Or if cleint/contractor/you all cash payments under the table, of course : there will be no tax info generated.
r*o
23 楼
1,2,3,7的median是2还是2.5?
【在 f******e 的大作中提到】 : 不对吧。 : X = 4,5,6 : Y = 1,2,3,7 : 求的是4 : 你的X的median加Y的median = 5+2 =7
r*k
24 楼
这就相当于现金交易了,如果身份没问题的话也无所谓的。
【在 s******n 的大作中提到】 : 谢谢您的回复~这个公司是个很不正规的骗子公司。他没有payrol,没有任何扣税信息 : 。不是cash payments,他每个月就固定往我账上打2000美元。有client,但是client : pay都是corp to corp. 真是被这个骗子骗得好惨。。。 : : to
n*n
25 楼
for array N(1..n) and M(1..m), n > m pick i from M (random, m/2, either way) search i position in N, say k, compare i+k and n+m/2, if larger, pick item in the (i+ k)/2 , if less, check item with order of ((m-i) + (n-k))/2), the new item could be in N or M. if new item in N, check the position in M, repeat the procedure till you find it.
【在 Q******e 的大作中提到】 : It can be log(m+n). I can not remember clearly. The basic idea is : suppose array1 = left1[..], median1, right1[...] : suppose array2 = left2[..], median2, right2[...] : we compare meidan1 and median 2, : if meidan1 < median 2 : then array1 = right[1], median1 = find_median(array1 ); // array : array2 = left[2], median2 = find_median(array2 ); : Repeat until you have two elements left. This is your median. : Maybe some details missing here.
【在 n****n 的大作中提到】 : for array N(1..n) and M(1..m), n > m : pick i from M (random, m/2, either way) : search i position in N, say k, : compare i+k and n+m/2, if larger, pick item in the (i+ k)/2 , if less, check : item with order of ((m-i) + (n-k))/2), the new item could be in N or M. if : new item in N, check the position in M, repeat the procedure till you find : it.
【在 Q******e 的大作中提到】 : It can be log(m+n). I can not remember clearly. The basic idea is : suppose array1 = left1[..], median1, right1[...] : suppose array2 = left2[..], median2, right2[...] : we compare meidan1 and median 2, : if meidan1 < median 2 : then array1 = right[1], median1 = find_median(array1 ); // array : array2 = left[2], median2 = find_median(array2 ); : Repeat until you have two elements left. This is your median. : Maybe some details missing here.
O(log(m+n)) and O(log(max(m,n))) are asymptotically the same thing
【在 z********y 的大作中提到】 : log(max(m, n))
c*l
47 楼
I have a question: since the question asks for the median of X U Y, what if X and Y have some elements in common? The number of common elemements can be from 0 to min(m, n), right? Thanks.
【在 Q******e 的大作中提到】 : It can be log(m+n). I can not remember clearly. The basic idea is : suppose array1 = left1[..], median1, right1[...] : suppose array2 = left2[..], median2, right2[...] : we compare meidan1 and median 2, : if meidan1 < median 2 : then array1 = right[1], median1 = find_median(array1 ); // array : array2 = left[2], median2 = find_median(array2 ); : Repeat until you have two elements left. This is your median. : Maybe some details missing here.
【在 Q******e 的大作中提到】 : It can be log(m+n). I can not remember clearly. The basic idea is : suppose array1 = left1[..], median1, right1[...] : suppose array2 = left2[..], median2, right2[...] : we compare meidan1 and median 2, : if meidan1 < median 2 : then array1 = right[1], median1 = find_median(array1 ); // array : array2 = left[2], median2 = find_median(array2 ); : Repeat until you have two elements left. This is your median. : Maybe some details missing here.
l*t
61 楼
求median,不就是求中间数吗? 既然X, Y都是sorted的了, 很容易得到最小值和最大值啊
d*e
62 楼
这解法是错的。
【在 Q******e 的大作中提到】 : It can be log(m+n). I can not remember clearly. The basic idea is : suppose array1 = left1[..], median1, right1[...] : suppose array2 = left2[..], median2, right2[...] : we compare meidan1 and median 2, : if meidan1 < median 2 : then array1 = right[1], median1 = find_median(array1 ); // array : array2 = left[2], median2 = find_median(array2 ); : Repeat until you have two elements left. This is your median. : Maybe some details missing here.
d*e
63 楼
正解。你是说padding? 譬如n < m, 直接将数组一扩充到和数组二一样? 或者每次甩min(n/2, m/2), where n, m are remaining array length. 同时可快速解决一些特例: if median1 == median2: return median1 else if median1 < median2: if arr1[-1] < arr2[0]: very simple math here. 复杂的就是数组重叠部分,不过应该很快。