intermediate
Challenge: an LRU cache
Implement this from the stub. Hidden tests grade the behaviour you write, not the comments you leave.
Challenge: an LRU Cache
export class LRUCache {
constructor(capacity: number) {
// Your implementation here
}
get(key: string): number | undefined {
// Your implementation here
}
put(key: string, value: number): void {
// Your implementation here
}
}challenge — implement from scratchCtrl+↵ submits · Ctrl+Shift+↵ runsstarter code