This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// LRUCache.js - super simple JavaScript Implementation | |
// LRU stands for "Least Recently Used" | |
// https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU | |
// ----------------------------------------- | |
function LRUNode(key) { | |
this.key = key; | |
this.next = this.prev = null; | |
} |