lru here we come

This commit is contained in:
mpaulson 2022-08-09 20:01:51 -06:00
parent 432f88550b
commit 8b4725a628
6 changed files with 34 additions and 3 deletions

8
src/__tests__/LRU.ts Normal file
View file

@ -0,0 +1,8 @@
import ArrayList from "@code/LRU";
test("LRU", function () {
const lru = new LRU<number>(10);
lru.
});

5
src/global.d.ts vendored
View file

@ -31,3 +31,8 @@ declare type GeneralNode<T> = {
value: T;
children: GeneralNode<T>[];
};
declare interface ILRU<K, V> {
update(key: K, value: V): void;
get(key: K): V | undefined;
}