Friday, November 7, 2014

FB 电面面经

发信人: ghycy15 (ghycy15), 信区: JobHunting
标  题: FB 电面面经
发信站: BBS 未名空间站 (Fri Nov  7 18:52:44 2014, 美东)

刚面完

题目不难,不过是烙印,拿不定

1. Given an integer array, place all the zeros to the end.
{4, 0, 5, 0, 8} => { 4, 5, 8, 0, 0}

follow up:不care顺数的话尽量少用write,swap就行

2.The number of valid combinations of a strings for given input array a[],
where a=>1, z => 26, and 0 <= a[i] <= 9

{1,1,1} => { aaa, ak, ka} => 3

{1,1,0} => {aj} => 1

follow up: O(1) memory

20分钟2题就写完了,非要我做了一堆test

他说马上就提交feedback,求bless
--
※ 来源:·WWW 未名空间站 网址:mitbbs.com 移动:在应用商店搜索未名空间·[FROM: 98.]

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

No comments:

Post a Comment