leetcode146. LRU 缓存
题目 题解 class LRUCache { private: int capacity; list<pair<int,int>>cache; unordered_map<int,list<pair<int,int>>::iterator> mp; public: L
题目 题解 class LRUCache { private: int capacity; list<pair<int,int>>cache; unordered_map<int,list<pair<int,int>>::iterator> mp; public: L
题目 题解 搬移官方题解 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nu
哈希/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * };