笔记本屏幕# Hardware - 计算机硬件
w*o
1 楼
今天的电面挂了,有道题真不知道怎么回答
If you need to design some cache. Usually you implement it with hashtable.
But what if you have some item which was not used for long time, you want
to delete it from cache when you add more items. What data structure will
you use ? In other words, if you want to delete those items not used often
but keep
those accessed often. What's the best data structure to do it ?
If you need to design some cache. Usually you implement it with hashtable.
But what if you have some item which was not used for long time, you want
to delete it from cache when you add more items. What data structure will
you use ? In other words, if you want to delete those items not used often
but keep
those accessed often. What's the best data structure to do it ?