Leetcode——双向链表和哈希表实现LRU缓存和LFU缓存
摘要:一、Leetcode146.LRU缓存 1. 使用STL list和unordered_map实现 using KV = pair<int, int>; class LRUCache{ private: int cacheCapacity; list<KV> cacheList; unordered
阅读全文
posted @ 2023-01-14 17:38
浙公网安备 33010602011771号