Friday, October 31, 2014

Addepar 电面面经

发信人: xxzbj (xxue), 信区: JobHunting
标  题: Addepar 电面面经
发信站: BBS 未名空间站 (Fri Oct 31 12:59:55 2014, 美东)

海投了2个星期,刚收到第一个电面,漫长的战斗要开始了。

攒人品贴个详细的电面面经,感觉题目很简单,但交流不畅,只怪自己太嫩了。

顺便: 长期求各种马工内推!!!地点不限,不胜感激!!!


Q): find the largest number in an array, explain how?
很easy, 走一遍数组,update一下最大值。

follow up:

1) so how many times of compare do you need?
很easy n-1。

2) Is there any chance fewer times of compare?
在想,
说不用想了,没有。

3) can you find the number using divide + conquer/ recursion? write the code
不明白为什么非要recursion,
说因为优势文件很大,电脑一次只能阅读1000个数据。
于是开始写了一个1000限制的程序。
说不对,我的1000只是比如, 用类似merge的想法做。
写了出来。

4) are you OK with the above algorithm in reality?
我说如果只要最大的,可以。
说如果两个失败者,你能得到其他信息吗?
不能

5) how can you the find the second largest number using the same algorithm(
recursion)?
不会,如果用quick select, heap 都很容易啊。
说必须就用这个类似recursion和 merge的算法。
思考中。
说提醒一下,用其他的数据结构可以
思考中,
提醒一下,你熟悉hashmap吗?
哦,熟悉,想。key是赢家,value是最大输家, 不停update最大输家。写了出来。
说,不好,如果 key是赢家,value是输家的list最好。

时间到。

后来想想,他说的方法跟我给的方法有区别吗?
--
※ 来源:·WWW 未名空间站 网址:mitbbs.com 移动:在应用商店搜索未名空间·[FROM: 149.]

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

No comments:

Post a Comment