随笔分类 -  design

摘要:link class Twitter { public: typedef list<pair<int,int>>::iterator It; unordered_map<int,list<pair<int,int>>> usertotweet; unordered_map<int,unordered 阅读全文
posted @ 2020-04-13 15:31 feibilun 阅读(134) 评论(0) 推荐(0)
摘要: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 阅读(354) 评论(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 阅读(114) 评论(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 阅读(181) 评论(0) 推荐(0)