摘要: 题目:https://leetcode cn.com/problems/lfu cache/ 思路: O(1)的数据结构:hashmap 维持最近使用:OrderdDict(详见LRU缓存问题) 使用一个hashmap维系key到出现频率的映射关系 另一个hashmap维系频率到数据(key val 阅读全文
posted @ 2020-04-14 10:06 luozx207 阅读(447) 评论(0) 推荐(0) 编辑