Thursday, June 4, 2015

http://www.mitbbs.com/article_t/JobHunting/31745443.html

A. Given an arbitrary tree, can you print it level by level (with each level
printed on the same line).Define your own tree node structure, can be 
binary tree or n-ary tree.

B. Given a set of distinct integers, can you print out all subsets?


Round 2:

A. Remove duplicated integers in an array, and then return an array without 
duplicates. Follow up: what if allow duplicates at most twice? 
i.e., [1, 1, 1, 2, 2, 3, 2] --> [1, 1, 2, 2, 3]

B. Given a string and a dictionary that maps a character to several 
characters, print all combination and tell the complexity. 
i.e., string = "face", f=> f, @, 4, h     a=> a, c, e
print: face, @ace, 4ace, .....

大家再简单讨论一下,我再比较一下做的对不对。

都是很常见的问题,所以很快就program完了,结果还剩下不少时间。面试官就问有什么问题,我就简单问了3个左右,然后就完了。

现在Facebook还要来一次phone interview,说是最后一次了,晕死,本来就很紧张,还要来一轮,刺激死了。敢情是回答的太快,代码是抄的,我的理解了....

有谁知道facebook一般需要需要几轮电面啊?几轮on-site?

No comments:

Post a Comment