![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
文章平均质量分 61
黑化后的亚瑟
这个作者很懒,什么都没留下…
展开
-
OJ书本分发
题目 Description You are given N number of books. Every ith book has Pi number of pages. You have to allocate books to M number of students. There can be many ways or permutations to do so. In each permutation one of the M students will be allocated the maxi原创 2021-12-20 23:25:26 · 250 阅读 · 1 评论 -
LRU缓存
LRU缓存 难度中等1217 运用你所掌握的数据结构,设计和实现一个 LRU (最近最少使用) 缓存机制 。 实现 LRUCache 类: LRUCache(int capacity) 以正整数作为容量 capacity 初始化 LRU 缓存 int get(int key) 如果关键字 key 存在于缓存中,则返回关键字的值,否则返回 -1 。 void put(int key, int value) 如果关键字已经存在,则变更其数据值;如果关键字不存在,则插入该组「关键字-值」。当缓存容量达到上限时,原创 2021-03-08 13:53:30 · 79 阅读 · 0 评论