LeetCode146. LRU缓存机制 附java代码
public class LRUCache { private Deque<Integer> queue = new ArrayDeque<>(); private Map<Integer, Integer> map = new HashMap<>(); private int capacity = 0; public LRUCache(int capacity) { this.capacity = cap.
原创
2020-10-19 16:46:20 ·
118 阅读 ·
0 评论