struct List_Node { int key, value; List_Node *pre; List_Node *next; List_Node(int a = 0, int b = 0) : key(a), value(b), pre(nullptr), next(nullptr) {} }; class Solution { private: int n, capacity_; List_Node *head; List_Node *tail; unordered_map <int, List_Node *&g...