Friday, September 30, 2016

面试题

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

发信人: choate (树叶), 信区: JobHunting
标  题: 面试题
发信站: BBS 未名空间站 (Fri Sep 30 00:29:14 2016, 美东)

最近面了几家公司

1, design short URL
2,  ransom notes.
3,  judge whether a string is a merge from other two strings,
4,  implement lru cache
5, implement a library that dispatch jobs to a thread pool after a certain
delay. the amount of delay time is given in a parameter. only care about
single machine implementations.

6 social graph, find out whether any 2 nodes are within 3 hops.  then how do
you define the schema (and how to partition the data) to store the graph to
minimize remote call in the above function.

7. several kind of bricks, each kind has a weight, and strength (weight of
bricks that can be laid on top). your have limited number of bricks from
each kind, find out the highest that you can lay the bricks.

8. a square of positive integers.  when you are in one cell, you can move up
, down, left or right. find a path that start from 0,0 end with n,n where
the sum of cell values on the path is the smallest.


No comments:

Post a Comment