由买买提看人间百态

topics

全部话题 - 话题: equal
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
S******1
发帖数: 269
1
// Find the longest subarray with equal 1 and 0.
public static int[] longestSub(int[] inputArray) {
int length = inputArray.length;
int[][] record = new int[length][length];
//Initial
for (int i = 0; i < length; i++)
if (inputArray[i] == 1)
record[i][i] = 1;
else
record[i][i] = -1;
for (int i = 0; i < length; i++) {
for (int j = i; j < length; j++) {
if (i < j)
... 阅读全帖
i**********e
发帖数: 1145
2
I think your method is more complicated than is needed.
The problem has a constraint that only 0's and 1's exist in the array.
We could use two counters to keep track of number of 0's and 1's met so far, and do a one-pass traverse across the array.
The length of the maximum size contiguous array with equal number of 0's and 1's must be:
2 * min( count of 0's, count of 1's ).
I know, it might seem too simple to be true, but sometimes being simple is also a virtue.
一些常见面试题的答案与总结 -
http://www.ihas1... 阅读全帖
s**********e
发帖数: 326
3
来自主题: JobHunting版 - Longest subarray with equal number of 1 and 0
dp题,我的思路,大家看看对不对
O(n)runtime and O(n) space的solution:
create an array of length n, len[n], len[i] represent the length of subarray
which has equal number of 1 and 0 ending at index i. Initially, set all the
element len[] to be 0.
len[i] = len[i - 1] + 2 if arr[i] = 1 - arr[i - len[i - 1] - 1]
len[i] = 0 otherwise
then scan array len[], find out the largest one
optimized solution, O(n)runtime and O(1) space的solution:
actaully, we do not need to keep array len[] since len[i] only ... 阅读全帖
s**********e
发帖数: 326
4
来自主题: JobHunting版 - Longest subarray with equal number of 1 and 0
dp题,我的思路,大家看看对不对
O(n)runtime and O(n) space的solution:
create an array of length n, len[n], len[i] represent the length of subarray
which has equal number of 1 and 0 ending at index i. Initially, set all the
element len[] to be 0.
len[i] = len[i - 1] + 2 if arr[i] = 1 - arr[i - len[i - 1] - 1]
len[i] = 0 otherwise
then scan array len[], find out the largest one
optimized solution, O(n)runtime and O(1) space的solution:
actaully, we do not need to keep array len[] since len[i] only ... 阅读全帖
h*0
发帖数: 39
5
刚看到很多公司网站的JD下面会有xxx is an Equal Opportunity Employer,后面是
*LI-MH1
*LI-PT1
*LI-JB1
请问这三行代码都是什么意思啊?有的公司有一行,有的有三行
s*****j
发帖数: 1087
6
That means equals() is problematic, it will cause unexpected result
especially in collection operation.
g*****g
发帖数: 34805
7
equals为 true, hashcode必须相等,否则是bug. 反之不必须。没有统计也不能以一个
例子来说hash function实现有问题。
s******t
发帖数: 229
8

同意这个,equals等了,hashcode怎么可能不等啊!! hash同一个key,value能不一样
???这还叫神马hash function啊
s*****j
发帖数: 1087
9
That means equals() is problematic, it will cause unexpected result
especially in collection operation.
g*****g
发帖数: 34805
10
equals为 true, hashcode必须相等,否则是bug. 反之不必须。没有统计也不能以一个
例子来说hash function实现有问题。
s******t
发帖数: 229
11

同意这个,equals等了,hashcode怎么可能不等啊!! hash同一个key,value能不一样
???这还叫神马hash function啊
T*********g
发帖数: 496
12
这个回答完全不对。
相同hashcode不同equals是非常正常的Hash冲突。这只能说明这两个对象不同。
f********c
发帖数: 147
13
来自主题: JobHunting版 - Java String的substring和equals function
感觉很多String操作的题目,如果用substring, equals, indexOf这些函数的话会很好
解决,但是看了很多网上的code有的反而用的比较少,是因为这些函数的复杂度大吗?
比如这三个函数,各自的复杂度(big O)是多少?面试过程中要尽量不用吗?

发帖数: 1
14
不造谣能死是么?

Facebook is proud to be an Equal Employment Opportunity and Affirmative
Action employer. We do not discriminate based upon race, religion, color,
national origin, gender (including pregnancy, childbirth, or related medical
conditions), sexual orientation, gender identity, gender expression, age,
status as a protected veteran, status as an individual with a disability, or
other applicable legally protected characteristics. ”

发帖数: 1
15
自己看那标题怎么写的“不再宣称Equal Employment”是不是你说的呀,说你造谣没冤
枉你吧。 :)

发帖数: 1
16
申请职位的时候,尤其是大些的公司,都会有equal opportunity的表填,你可以自愿
(至少法律上是这样的)报告自己的族裔,性别什么的。
我知道其实我的名字和简历基本已经完全透露了我是一个外国出生的asian,最多性别
可能美国人不能直接猜出来。我只是比较讨厌现在美国的语境下一般意义上的这套
diversity的东西,然后那张表又说是自愿填的,按照法律完全不会对最后是否得到工
作有任何影响什么的。。。加上懒。。所以碰到这种表我就能不填就不填,填也是无脑
选decline to answer。
但是现在我又在想,这个是不是真的“完全不会对最后是否得到工作有任何影响“。
decline to answer会不会有不好的影响。。。有比较了解内幕的老司机能说明一下情
况么。比如删简历的HR看不看得到这个表,还是表和简历关联之后,HR(及之后整个流
程)相关的人都看不到。。或者别的什么。。。

发帖数: 1
17
来自主题: JobHunting版 - 你们相信equal opportunity吗?
我非常的怀疑。
那些非常低端的工作,比如麦当劳,walmart的工种,我相信,equal opportunity是存
在的。。。
高一点的,需要文凭的工作,我都不相信我能找到。。尽管我不相信,我没有放弃
trying,不试怎么知道呢。。。。
都说美国是the land of opportunity,这是属实吗?
anyway ,。。。昨晚上睡了8小时,今天浑身都是正能量。。。
祝大家新年心想事成!
t*c
发帖数: 8291
18
来自主题: Parenting版 - equal opportunity education
其实大学录取在所有国家都不识equal opportunity的。
比如在中国,首先有地区差异,然后在同一地区,有民族差异,
少数民族可以加分20。
只是美国在种族差异上,这个不公平更加厉害,华人需要比黑人
多400分才能被藤校录取。在UCLA, 华人需要比黑人多40%的分数
才能被录取,尽管UCLA号称没有AA, 号称完全不考虑种族。

.
universities
v**n
发帖数: 130
19
google 了一下, 还是看的云里雾里。 如果是tax equalization 是不是401K 和SS
tax 正常交呢?年底报税的时候是公司给报吗?中国美国相比美国的税好似低一些 (
45% vs 35%) 谢啦
R******d
发帖数: 1436
20
2010年从英国买了点艺术品(装饰品),价值6000块。邮寄过来的,fedex帮海关代收
了一些税。
周末收到加州board of equalization的信,说是要再交9%的use tax,due day居然是
明天。
请问有人遇到过这种情况么?看起来是正规政府部门。
R******d
发帖数: 1436
21
2010年从英国买了点艺术品(装饰品),价值6000块。邮寄过来的,fedex帮海关代收
了一些税。
周末收到加州board of equalization的信,说是要再交9%的use tax,due day居然是
明天。
请问有人遇到过这种情况么?看起来是正规政府部门。
G****S
发帖数: 46
22
昨天收到state board of equalization the信, 说我去年进口了一些物品(相机, 自
用)到加州, 可能需要交use tax。但是没有给出我要交多少税。 信上面还有一个
reference number. 请教各位大神该怎么办啊?多谢!
v****a
发帖数: 550
23
来自主题: Working版 - Equal Pay Act适用于H1B holder吗?
发现自己比同级别但是水平远不如自己的美国人低许多,我平时performance review都
很好,对公司的贡献也不小。查PayScale等网站发现自己的薪水way below the median
for the same title and qualifications。 自己目前还是H1B holder,刚file 485
。 感觉公司在分配project和equal pay上存在性别歧视和national origin方面的歧视
,请问这个歧视适用于我这种身份吗?是不是说H1B holder忍受低薪水是应该的,反歧
视条款不适用?
还有我好像在哪里看到说,公司不能以帮办h1b,绿卡为由而不给加工资,至少不能明着
说。请问是真的吗?
x*****9
发帖数: 36
24
来自主题: Immigration版 - Equal contribution verification letter?
有几片3 4作的文章想吹一下 要不要找一作写个equal contribution verification
letter? 大家谁有这方面的经验的 如果能给个template就不胜感激了 多谢
y***u
发帖数: 174
25
来自主题: EB23版 - All the men are born equal
但总有人希望自己比别人更equal。
申请绿卡是为了能够得到更公平的参加竞争的机会;可是现在一边申请着绿卡,另一边
又去嘲笑那些比我们穷的墨西哥难民,希望把他们紧紧卡死。很快拿到绿卡的,希望其
他人都要花长的多的时间拿绿卡。
每个人都是平等的,不管国际、肤色、种族,都应该获得公平竞争的机会。事实上,只
有所有美国人都真正意识到这点,我们在这个国家才会更有机会。
B*****g
发帖数: 34098
26
来自主题: EB23版 - All the men are born equal
All the men are born equal
m**x
发帖数: 8454
27
来自主题: EB23版 - All the men are born equal
equal is not an absolute concept
b***m
发帖数: 5987
28
来自主题: EB23版 - All the men are born equal
是啊,所以合法和非法不equal这个诉求也很正常吧。
a*******z
发帖数: 144
29
来自主题: EB23版 - All the men are born equal
Unfortunately, according to Thomas Jefferson's Declaration of Independence,
it is "All men are CREATED equal."
Believe it or not, it is CREATED.
t**********0
发帖数: 1700
30
来自主题: EB23版 - All the men are born equal
要equal,还要国界线干嘛?
d*****e
发帖数: 13
31
申请ANU的位置时,让写A demonstrated understanding of equal opportunity
principles and policies and a commitment to their application in a
University context
看了申请的说明之后,还是没搞懂能写啥
欢迎大虾指点
另外ANU博后,65000plus 17% superannuation,扣除各种税之后有多少钱?小孩有啥福
利没?
多谢多谢
T**********r
发帖数: 1223
32
【 以下文字转载自 WorldNews 讨论区 】
发信人: TradeSmarter (Smarter), 信区: WorldNews
标 题: 华裔不是想争取优待,是争取Equal Opportunity
发信站: BBS 未名空间站 (Fri Jan 11 09:22:12 2008)
在美国的亚裔权益是自己争取才可能取得的。黑人不会帮你取得,你也不可能靠黑人帮
你取得权益。
你知道吗?亚裔孩子上斯坦福,伯克利,哈佛需要比别的种族需要SAT高几百分。在亚
裔是比黑人还
少的少数种族。黑人可是有Affirmative Action。 而奥巴马是唯一不支持亚裔争取获
得平等对待的候选
人。
在美国,Minority是不包括华裔的。
种族歧视是不对的,我坚决支持种族平等。对某些种族优待也一样的不对。对亚裔不但
没有优待,而
是歧视,更加是错误的。
如果你觉得亚裔是overrepresented了,那NBA 90%的黑人球员,犹太人在华尔街,是不
是也应该
限制呢? NBA应该对黑人球员比例限制在30%。因为他们人口才12%。30%已经是over-
represented
了。白人在中
j****7
发帖数: 667
33
LOS ANGELES (Reuters) - California's Hispanic population will equal that of
whites this year before becoming the state's largest demographic group in
2014 for the first time since statehood in 1850, a government report showed
on Thursday.
That change in the most populous U.S. state will make it the third where
whites do not comprise a plurality of the population, after New Mexico and
Hawaii.
The shift is occurring alongside nationwide growth in the Hispanic
population, which grew to 16.7 percent... 阅读全帖
p*****s
发帖数: 708
34
这种拿home equality出来买房子,还需要
付downpayment吗?
t*******y
发帖数: 10477
35
来自主题: Fishing版 - All fish created equal?
all junk fisherman are created equal too,lol
D******y
发帖数: 3780
36
来自主题: Fishing版 - All fish created equal?
all posts are created equal.
re this one...

在。
i******k
发帖数: 4625
37
来自主题: Fishing版 - All fish created equal?
all junk fisherman are created equal except fisherwoman.
r****c
发帖数: 1494
38
这个,就要看你的驱动有没有equalizer了。
Realtek的驱动貌似是有的。看看声卡自带的软件吧。
我用了效果还可以。
r****c
发帖数: 1494
39
话说realtek的声卡也是可以自定义均衡器的。
http://bbs.pcbeta.com/archiver/tid-552197.html
linux下的pulseaudio equalizer效果可以达到20dB
相当不错
难道没有人觉得这个声音令人心烦?
b**********n
发帖数: 2812
40
pplive有equalizer么?
d**n
发帖数: 559
41
What else did Djokovic say?
The Serb admitted it was a "very delicate situation" and was "completely for
women power". He said:
◾Equal prize money has been the main subject of the tennis world in
the past seven or eight years
◾Both men and women's games should "fight for what they think they
deserve"
◾Women have to go through "hormones" and other challenges men do not
◾Women have to make "sacrifices for certain periods of time, the
family time or decisions that they make ... 阅读全帖
d*******d
发帖数: 3382
42
netflix跌残了,看了一定很解气吧?
http://finance.yahoo.com/news/Higher-Netflix-prices-equals-apf-
“will end September with 600,000 fewer U.S. customers than it had in June.
It will mark just the second time in 12 years that Netflix has lost
subscribers from one quarter to the next. The last downturn occurred during
2007 when Netflix lost a mere 55,000 from March through June.”
p********a
发帖数: 6437
43
两个都看过的说说
equalizer可是其实一般,不到taken的档次
john wick有taken的档次吗?
p********a
发帖数: 6437
44
equalizer 我感觉就是餐馆密室的一场秒杀看着刺激
其他一般啊,特别是结尾一战,很平庸
主要胡胜顿自身的气场太牛逼了,撑住了场面很多时候.
s*****j
发帖数: 6435
45
equalizer 里面他去找朋友的时候,那女的说:he is not asking for help, but
asking for permission.
是什么意思?
d********l
发帖数: 4221
46
equalizer亮点是华盛顿, 整个人气场强大
wick亮点是枪战, 特别是杀人必爆头的设定,很特别而且感觉很真实
最后干掉boss儿子那段特别干脆,我还以为wick要上去放放恨话出出气啥的
结果没有一句废话,上去就一枪爆头。。。。
w*********a
发帖数: 9279
47
被版上的人骗了,去看了john wich。 太一般了。太一般了。
后悔了, 今天不如去看 fury。
跟前一阵的equalizer一比,john wick简直就是幼儿园水平
s*****j
发帖数: 6435
48
我觉得这两差不多呀。
当然,equalizer 里面的正义感要大得多。
M******5
发帖数: 60
49
明显没看过
I, Frankenstein 3D
或者
Conan the Barbarian
看过 就知道为啥equalizer 4颗星了
u******a
发帖数: 7843
50
研究了下, 是 equalize the odds 的意思.
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)