MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / initItem

Function initItem

cache/lfu.go:44–50  ·  view source on GitHub ↗

initItem to init item for LFU

(k string, v any, f int)

Source from the content-addressed store, hash-verified

42
43// initItem to init item for LFU
44func initItem(k string, v any, f int) item {
45 return item{
46 key: k,
47 value: v,
48 freq: f,
49 }
50}
51
52// Get the key in cache by LFU
53func (c *LFU) Get(key string) any {

Callers 1

PutMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected