Redian新闻
>
[cloudera面试] senior engineer
avatar
[cloudera面试] senior engineer# JobHunting - 待字闺中
d*w
1
cloudera面试也算是挺变态的,先是一轮coding homework, 两轮电面,两次onsite,
主要是面hadoop了。很多题已经及不清了。现在把当时笔试题给大家参考一下
Write a program that takes an integer and prints out all ways to multiply
smaller integers that equal the original number, without repeating sets of
factors. In other words, if your output contains 4 * 3, you should not
print out 3 * 4 again as that would be a repeating set. Note that this is
not asking for prime factorization only. Also, you can assume that the
input integers are reasonable in size; correctness is more important than
efficiency.
$ java -cp . PrintFactors 12
12 * 1
6 * 2
4 * 3
3 * 2 * 2
$ java -cp . PrintFactors 32
32 * 1
16 * 2
8 * 4
8 * 2 * 2
4 * 4 * 2
4 * 2 * 2 * 2
2 * 2 * 2 * 2 * 2
$ java -cp . PrintFactors 96
96 * 1
48 * 2
32 * 3
24 * 4
24 * 2 * 2
16 * 6
16 * 3 * 2
12 * 8
12 * 4 * 2
12 * 2 * 2 * 2
8 * 6 * 2
8 * 4 * 3
8 * 3 * 2 * 2
6 * 4 * 4
6 * 4 * 2 * 2
6 * 2 * 2 * 2 * 2
4 * 4 * 3 * 2
4 * 3 * 2 * 2 * 2
3 * 2 * 2 * 2 * 2 * 2
btw:感觉这公司挺有前途的,盈利很厉害,hadoop咨询居然按节点收费,好像一个结点
就按4000刀一年,已经很多大客户了。真是太暴利了。
avatar
l*i
2
niu
avatar
w*z
3
太多人做hadoop了

【在 d********w 的大作中提到】
: cloudera面试也算是挺变态的,先是一轮coding homework, 两轮电面,两次onsite,
: 主要是面hadoop了。很多题已经及不清了。现在把当时笔试题给大家参考一下
: Write a program that takes an integer and prints out all ways to multiply
: smaller integers that equal the original number, without repeating sets of
: factors. In other words, if your output contains 4 * 3, you should not
: print out 3 * 4 again as that would be a repeating set. Note that this is
: not asking for prime factorization only. Also, you can assume that the
: input integers are reasonable in size; correctness is more important than
: efficiency.
: $ java -cp . PrintFactors 12

avatar
d*w
4
是么,但还是很缺人啊,感觉他们也很难招人

【在 w**z 的大作中提到】
: 太多人做hadoop了
avatar
c*p
5
关键是真正有large-scale data process经验的人不多。这要有条件接触到这样的
project才行

【在 d********w 的大作中提到】
: 是么,但还是很缺人啊,感觉他们也很难招人
avatar
l*c
6
very good~
avatar
t*a
7
谢谢分享
avatar
l*a
8
void PrintFactors(vector & factor, int num, int index, vector& o,
vector >& res){
if(num == 1){
res.push_back(o);
return;
}
if(index >= factor.size()){
return;
}
for(int i = 0; pow(factor[index], i) <= num; i++){
if((num % (int)pow(factor[index], i)) != 0) continue;
for(int j = 0; j < i; j++){
o.push_back(factor[index]);
}
PrintFactors(factor, num / pow(factor[index], i), index + 1, o, res);
for(int j = 0; j < i; j++){
o.pop_back();
}
}
}
vector > PrintFactors(int num){
vector > res;
vector factor;
for(int i = 2; i <= num; i++){
if(num % i == 0){
factor.push_back(i);
}
}
reverse(factor.begin(), factor.end());
vector o;
PrintFactors(factor, num, 0, o, res);
reverse(res.begin(), res.end());
return res;
}
avatar
w*p
9
import sys;
def pfact(mult, fact, prefix):
for f in reversed(range(2, fact+1)):
d, m = divmod(mult, f)
if not m:
if d == 1: print "%s %d" % (prefix, f)
else: pfact(d, f, "%s %d *" % (prefix, f))
def prtFact(orig):
pfact(orig, orig, '')
prtFact(int(sys.argv[1]))
avatar
h*n
10
python写代码就是简单啊。。无语。。

【在 w******p 的大作中提到】
: import sys;
: def pfact(mult, fact, prefix):
: for f in reversed(range(2, fact+1)):
: d, m = divmod(mult, f)
: if not m:
: if d == 1: print "%s %d" % (prefix, f)
: else: pfact(d, f, "%s %d *" % (prefix, f))
: def prtFact(orig):
: pfact(orig, orig, '')
: prtFact(int(sys.argv[1]))

avatar
a*3
11
不会hadoop的人是不是就不要申请了?申请也没戏?
avatar
d*w
12
我的帖子又顶上来了嘛,不知道hadoop的人也可以,hortonworks我还认识一个人之前
没做过任何hadoop的。这边it公司还是考一些算法基本coding,其他的都好办。

【在 a********3 的大作中提到】
: 不会hadoop的人是不是就不要申请了?申请也没戏?
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。