Redian新闻
>
redfin的Agent有人用过吗
avatar
redfin的Agent有人用过吗# Living
S*C
1
今天面试一个挺高大上的公司,一个韩国面试官让我实现一个HashMap class
我把Entry写成 static inner class
他说应该写成 static inner interface
但HashMap JDK 源代码中的确是写成 static inner class来implement Map.Entry
inner interface的,这个面试官根本没看过源代码,他说要写成static inner
interface的原因仅仅是他找到存在Map.Entry这个interface的api
还有一个问题,我写了一个简洁的hashcode()方法
private int hash(K key){
int hashcode = key.hashCode();
return hashcode > 0 ? hashcode % table.length : -hashcode % table.
length;
}
他说hash怎么可能是负的,为什么要写这个判断语句
实际上
sometimes the hashcode calculation itself goes beyond the Integer.MAX_VALUE,
i.e 2147483647. what happens then is
that we get a negative integer after the overflow. Negative hashcode is
perfectly valid!
当然面试官知道一些我不知道的东西
avatar
w*r
2
值得推荐吗?
avatar
c*w
3
真受不了了。面食馆和被面的都尼玛就是马宫而已,不是把面试管当老师,就是把面试
的当考生。。都尼玛什么思维阿,还没出学校呢吧。
avatar
c*7
4
据说还可以,不催着买,还有些rebate。
avatar
d*c
5
面试很大情况下是看你的表达能力已经跟这个人work会不会comfortable。interviewer
也不一定know everything
avatar
y*2
6
很不错。
avatar
n*n
7
楼主,你太年轻了
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。