网站首页
编程语言
数据库
系统相关
其他分享
编程问答
unorderedMap
2024-09-19
146. LRU 缓存
\classLRUCache{public:LRUCache(intcapacity):_capacity(capacity){}intget(intkey){autoit=_unorderedMap.find(key);if(it!=_unorderedMap.end()){_list.splice(_list.begin(),_list,it->se