MCPcopy Create free account
hub / github.com/austingebauer/go-leetcode / LRUCache

Struct LRUCache

lru_cache_146/solution.go:3–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1package lru_cache_146
2
3type LRUCache struct {
4 capacity int
5 load int
6 keyMap map[int]*LRUNode
7
8 // font is always the latest used
9 front *LRUNode
10 // rear is always the least recently used (LRU)
11 rear *LRUNode
12}
13
14type LRUNode struct {
15 prev *LRUNode

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected