1、汇总概要
以下思路涵盖了哈希与双向链表的结合使用、缓存设计等知识点
2、题目
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get
and put
.
get(key)
- Get the value (will always be positive) of the key if the key exists in the cache, otherwise return -1.
put(key,