leetcode-146-LRU缓存机制

题目描述: 方法一:有序字典 O(1) from collections import OrderedDict class LRUCache(OrderedDict): def __init__(self, capacity: int): self.capacity = capacity def get(self, key: int) -> int:
相关文章
相关标签/搜索