系统设计:数据流中出现最频繁的k个元素(find top k frequent items in a data stream)# JobHunting - 待字闺中
P*e
1 楼
https://soulmachine.gitbooks.io/system-design/content/cn/bigdata/heavy-
hitters.html
从算法角度,上面文章说用hashmap + heap. 可是heap只能告诉你 max value. 你每次
给出top K 不是吧这个heap 摧毁了吗(pop off all values from heap)?难道每次再
重建一边?
hitters.html
从算法角度,上面文章说用hashmap + heap. 可是heap只能告诉你 max value. 你每次
给出top K 不是吧这个heap 摧毁了吗(pop off all values from heap)?难道每次再
重建一边?