注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
I recently had an Amazon SDE II phone interview. The coding question involved routing incoming network packets to backend servers.
The initial problem was to write a function that takes a list of active server IDs and a packet identifier, such as a source IP address and port, and returns the server ID that should handle that packet. With the same set of active servers, the same packet identifier should consistently map to the same server.
The interviewer gave examples like these.
servers = ["server1", &quoprove with more time, and I mentioned binary search to optimize the server lookup.
The question felt very specific to the team because the interviewer mentioned that this was related to the work he actually does. At the end of the interview, he recommended that I look up consistent hashing. |