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:
相關文章
相關標籤/搜索