设计
liuchenjane
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
460. LFU Cache
Design and implement a data structure for Least Frequently Used (LFU) cache. It should support the following operations: get and put. get(key) - Get the value (will always be positive) of the key转载 2017-02-08 08:57:35 · 636 阅读 · 0 评论 -
380. Insert Delete GetRandom O(1)
Design a data structure that supports all following operations in average O(1) time. insert(val): Inserts an item val to the set if not already present.remove(val): Removes an item val from the转载 2017-02-15 19:35:44 · 325 阅读 · 0 评论 -
381. Insert Delete GetRandom O(1) - Duplicates allowed
Design a data structure that supports all following operations in average O(1) time. Note: Duplicate elements are allowed. insert(val): Inserts an item val to the collection.remove(val): Remov转载 2017-02-16 09:57:32 · 369 阅读 · 0 评论 -
自定义String类
//一个自建的MyString类 #include <iostream> #include <cstring> using namespace std; class String{ private: char * str; int len; static int num_strings;//number of objects; publ原创 2017-03-25 13:32:15 · 573 阅读 · 0 评论
分享