LRU 算法
LRU (最近最少使用) 缓存机制
/**
* @param {number} capacity
*/
var LRUCache = function(capacity) {
};
/**
* @param {number} key
* @return {number}
*/
LRUCache.prototype.get = function(key) {
};
/**
* @param {number} key
* @param {number} value
* @return {void}
*/
LRUCache.prototype.put = function(key, value) {
};
/**
* Your LRUCache object will be instantiated and called as such:
* var obj = new LRUCache(capacity)
* var param_1 = obj.get(key)
* obj.put(key,value)
*/
leetcode
https://leetcode.com/problems/lru-cache/
https://leetcode-cn.com/problems/lru-cache/
refs
https://www.geeksforgeeks.org/program-for-least-recently-used-lru-page-replacement-algorithm/
https://en.wikipedia.org/wiki/Cache_replacement_policies
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!