福利gif# Joke - 肚皮舞运动
e*x
1 楼
非名校CS Master new grad~ 本科zju数学的
之前一心准备google,还是挂了
对machine learning,data mining比较感兴趣,不过这些组master好难进。
但自我感觉算法不错,求ms,fb大牛们的内推呢~~
把onsite的题抓上来~
1. Three coke machines. Each one has two values min & max, which means if
you get coke from this machine it will load you a random volume in the range
[min, max]. Given a cup size n and minimum soda volume m, show if it's
possible to make it from these machines.
比如三台machine(50, 100), (100, 200), (500, 1000). n=110, m=40, yes. n=90, m
=40, no. n=100, m=60, no.
2. n*m grids. How many ways from (0,0) to (n,m).
这题简单,我把递归非递归都写了一遍。
3. Given a sorted array, make a balanced binary search tree.
4. n 2D integer points. Find an point so that the total distances from each
one to this point are minimal. Distance of (x1, y1) and (x2, y2) is defined
as |x1-x2| + |y1-y2|.
这题挺郁闷的,觉得面试官不给力。。我说可以化解为一维的问题因为x,y
independent,他问了我半天为什么。
5. About Inheritance & polymiorphism. A class, like LinkedList in Java, has
two methods add & addall. Write a subclass to count how many times "add" is
called.
Be careful about how "addall" is implemented.
这题中间犯了个小错误,后面又讨论了下怎么处理多线程。
之前一心准备google,还是挂了
对machine learning,data mining比较感兴趣,不过这些组master好难进。
但自我感觉算法不错,求ms,fb大牛们的内推呢~~
把onsite的题抓上来~
1. Three coke machines. Each one has two values min & max, which means if
you get coke from this machine it will load you a random volume in the range
[min, max]. Given a cup size n and minimum soda volume m, show if it's
possible to make it from these machines.
比如三台machine(50, 100), (100, 200), (500, 1000). n=110, m=40, yes. n=90, m
=40, no. n=100, m=60, no.
2. n*m grids. How many ways from (0,0) to (n,m).
这题简单,我把递归非递归都写了一遍。
3. Given a sorted array, make a balanced binary search tree.
4. n 2D integer points. Find an point so that the total distances from each
one to this point are minimal. Distance of (x1, y1) and (x2, y2) is defined
as |x1-x2| + |y1-y2|.
这题挺郁闷的,觉得面试官不给力。。我说可以化解为一维的问题因为x,y
independent,他问了我半天为什么。
5. About Inheritance & polymiorphism. A class, like LinkedList in Java, has
two methods add & addall. Write a subclass to count how many times "add" is
called.
Be careful about how "addall" is implemented.
这题中间犯了个小错误,后面又讨论了下怎么处理多线程。