两道很有意思的面试题目,大家议一议# JobHunting - 待字闺中
b*a
1 楼
A constant incoming requests, each associated with a unique key, estimate
the total amount of unique requests within a period of time. Memory cannot
hold all the keys. Don't save data on disk. Rough estimation will be fine.
这个感觉是Count-min Sketch,但是具体怎么做呢?Count-min Sketch不保存全部原始
key,
另一个也是 A constant incoming requests, 要求给出过去任意一分钟/五分钟/一小
时/一天/一个月/ 的统计数据,如number of requests, number of unique request,
etc.
这个问题更加Open, 怎么实现比较好呢?
the total amount of unique requests within a period of time. Memory cannot
hold all the keys. Don't save data on disk. Rough estimation will be fine.
这个感觉是Count-min Sketch,但是具体怎么做呢?Count-min Sketch不保存全部原始
key,
另一个也是 A constant incoming requests, 要求给出过去任意一分钟/五分钟/一小
时/一天/一个月/ 的统计数据,如number of requests, number of unique request,
etc.
这个问题更加Open, 怎么实现比较好呢?