1. [Google], map server用户太多,如何做来提高系统的性能?
1. ajax,可以不用用户每次都download整个map,他们已经使用
2. 使用middleware,来维护数据库链接,并且做load balance等等
3. 使用distributed system,来使不同的用户使用不同的server.
后来居然问怎么来devide,回答说根据不同的ip来区别不同的物理地址,
居然又追问,还有没有其他方法,回答说解析他们的httprequest,
看看所在的不同的时区,不同的语言,国家什么的,blabla
4. 增加server的memory,提高cpu性能,等硬件方面.
5. 提高数据库性能,给数据库做partition,blabla…
最重要的是要先找出性能瓶颈在哪里
2. how to make copy big file to many machines faster
3. 写代码的时候,往往会给array定一个max_number, 如果现实中有可能出现高于这个数字,怎么测试?比如找出邻近的wifi网络数,max_number再怎么大,总有可能超出,怎么测试呢?而且比如这种情况还很难模拟(很难在现场设几百个网络吧),怎么测试?不准用动态数组。
4. 对于common sense的问题,要有所准备,比如为什么要来FB?为什么离开上一家公司?你有什么改进FB产品的建议?等等。
5. 一台服务器每过三天就要挂一次,需要重启才能再次使用,每次重启需要一分钟的时间;问有什么方法能解决这个问题。
一些有用的网上资源
http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Sort/
http://www.4shared.com/document/qzFCPK8f/101_Dynamite_Answers_t
http://www.4shared.com/document/SmfrgYjD/Career_-_201_Best_Ques
http://www.4shared.com/document/Eqg6xcuH/Knockout_answers_to_to
http://courses.csail.mit.edu/iap/interview/materials.php
推荐“A Collection of Dice Problems”,面试facebook时遇到不少概率题,都不超出这篇文章的思路和难度。
http://www.ibm.com/developerworks/aix/tutorials/au-memorymanage
Lock-free algorithms。推荐
http://www.ibm.com/developerworks/java/library/j-jtp04186/index
排序和binary search算法题,推荐http://www.cs.princeton.edu/introcs/42sort
http://www.cl.cam.ac.uk/~cwc22/hashtable/
C++里创建二维数组,http://www.codeproject.com/KB/cpp/arrayDinamic.aspx
关于DP http://people.csail.mit.edu/bdean/6.046/dp/
http://www.algolist.net/
http://cslibrary.stanford.edu/
http://www.cs.bell-labs.com/cm/cs/pearls/
http://www.cs.berkeley.edu/~vazirani/algorithms.html
<编程之美>
<程序员面试宝典>
<何海涛面试题精选>
Algorithm to learn:
Facebook system design question from glassdoor
Design the Facebook Credit system which is a application where users can buy/trade virtual currency and can use the virtual currency to purchase Facebook services, like paid apps.
Design a system to detect typos and provide suggestions to users.
考虑用户的历史数据
http://norvig.com/spell-correct.html
How will you design TinyUrl
How will you design facebook newsfeed. Focus was on a design which could handle the huge number of status updates and display them on each of the user’s friend’s wall.
Facebook system design question from careercup
Question: Design a component that implements the following functionality..
1) Record an Event (For the sake of simplicity, treat the Event as an integer code)
2) Return the number of Events recorded in the last one minute.
3) Return the number of Events recorded in the last one hour.
i.e implement the following interface
- Design the interface first
- Give the implementation detail.
<<>>
Open ended question:
What if there isn’t enough storage available to store each individual event
4
Say you need to design a web application which needs to support friends of
friends function(like in linked in, when you search a person, it will show
you if this person is linked with you, your connection or your connections’
conection…), we expect to have millions of users and each user may have
thousands of friends, how would you design/implement this function to make
it scalable.
Design Farmville,
Consider only crops and animals for now.
Whats classes will you have
How will you handle interactions between various objects
What design patterns can you use
How will you handle millions of users
How will you design the backend for faceboo