l***y 发帖数: 21 | 1 电面:
1. 实现一个histogram, 能inc/get每种metric的counter.
void incCounter(String metric)
int getCounter(String metric)
2. followup: 修改以上histogram应付并发读写
onsite:
1. how to create a generic singleton class
2. 求integer流中最近k条数据的avg
public class KAvg {
public KAvg(int k );
public void add(int x);
public int getKAvg();
}
followup: 并发add/getAvg
3. 用AtomicLong或compareAndSwap原语实现spin_lock, spin_semaphore, reentrant_
spin_lock
描述spin_lock的self deadlock情况
4. design whatsapp
5. behavior/ team conflict/strength/weakpoint
6. go through background |
e***a 发帖数: 1661 | 2 did u work out these concurrency programming questions? |
l***y 发帖数: 21 | 3 yes, lz is an expert on concurrency.
【在 e***a 的大作中提到】 : did u work out these concurrency programming questions?
|
z******s 发帖数: 197 | 4 赞分享 offer情况如何?
【在 l***y 的大作中提到】 : 电面: : 1. 实现一个histogram, 能inc/get每种metric的counter. : void incCounter(String metric) : int getCounter(String metric) : 2. followup: 修改以上histogram应付并发读写 : onsite: : 1. how to create a generic singleton class : 2. 求integer流中最近k条数据的avg : public class KAvg { : public KAvg(int k );
|
a***u 发帖数: 383 | |
x****y 发帖数: 252 | 6 牛人。
请教:如何准备concurrency programming? |