摘要:
link class Skiplist { public: struct Node{ int key; Node* down; Node* next; Node(int k, Node* d, Node *n){ key=k; down=d; next=n; } }; Node* head; Ski 阅读全文
摘要:
link class LRUCache { public: int cap; int size; unordered_map<int,int> ktov; // key to value unordered_map<int,list<int>::iterator> ktoi; // key to i 阅读全文
摘要:
link class LFUCache { public: unordered_map<int,int> ktov; // key to value unordered_map<int,int> ktof; //key to freq unordered_map<int,list<int>> fto 阅读全文
摘要:
link #include <cstdio> #include <cmath> #include <vector> #include <algorithm> #include <climits> #include <unordered_map> #include <cstdio> #include 阅读全文