c*e
1 楼
最近面了几家公司
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.
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.