| 1 | package lru_cache_146 |
| 2 | |
| 3 | type 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 | |
| 14 | type LRUNode struct { |
| 15 | prev *LRUNode |
nothing calls this directly
no outgoing calls
no test coverage detected