摘要: 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 阅读全文
posted @ 2020-03-07 20:09 feibilun 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-03-07 19:07 feibilun 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-03-07 17:47 feibilun 阅读(165) 评论(0) 推荐(0) 编辑
摘要: link #include <cstdio> #include <cmath> #include <vector> #include <algorithm> #include <climits> #include <unordered_map> #include <cstdio> #include 阅读全文
posted @ 2020-03-07 07:57 feibilun 阅读(115) 评论(0) 推荐(0) 编辑