由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - [cloudera面试] senior engineer
相关主题
请教 print factors 这个题弱问现在弯曲哪里收普通java屌丝?
hadoop面试和学习总结Data bricks怎样?
[hortonworks面经] senior hadoop engineer做Spark前途咋样啊?
hortonworks这个公司如何 (转载)有人收到过docker的offer么?
求问hadoop学习资料问道题: prime factor
WalmartLabs vs Twitter vs HortonworksHortonworks filed ipo
面试犯2了这几家公司怎么样?
MapR Technologies continue hiring a lot of positions忙里偷闲,列举了各首字母脑子里第一反应的高科技公司
相关话题的讨论汇总
话题: int话题: vector话题: num话题: factor
进入JobHunting版参与讨论
1 (共1页)
d********w
发帖数: 363
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刀一年,已经很多大客户了。真是太暴利了。
l***i
发帖数: 1309
2
niu
w**z
发帖数: 8232
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

d********w
发帖数: 363
4
是么,但还是很缺人啊,感觉他们也很难招人

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

【在 d********w 的大作中提到】
: 是么,但还是很缺人啊,感觉他们也很难招人
l****c
发帖数: 782
6
very good~
t****a
发帖数: 1212
7
谢谢分享
l*****a
发帖数: 559
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;
}
w******p
发帖数: 166
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]))
h****n
发帖数: 1093
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]))

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

【在 a********3 的大作中提到】
: 不会hadoop的人是不是就不要申请了?申请也没戏?
1 (共1页)
进入JobHunting版参与讨论
相关主题
忙里偷闲,列举了各首字母脑子里第一反应的高科技公司求问hadoop学习资料
讨论一下还没上市的创业公司WalmartLabs vs Twitter vs Hortonworks
记得前段时间有位仁兄把申请的所有公司分了类,帖子有谁保存了么面试犯2了
除了square, twitter还有什么热门公司?MapR Technologies continue hiring a lot of positions
请教 print factors 这个题弱问现在弯曲哪里收普通java屌丝?
hadoop面试和学习总结Data bricks怎样?
[hortonworks面经] senior hadoop engineer做Spark前途咋样啊?
hortonworks这个公司如何 (转载)有人收到过docker的offer么?
相关话题的讨论汇总
话题: int话题: vector话题: num话题: factor