[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刀一年,已经很多大客户了。真是太暴利了。
主要是面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刀一年,已经很多大客户了。真是太暴利了。