MCPcopy Create free account
hub / github.com/VanjaRo/LeetCode / main

Function main

tasks/146.go:5–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import "fmt"
4
5func main() {
6 lru := Constructor(2)
7 lru.Put(2, 1)
8 lru.Put(1, 1)
9 lru.Put(2, 3)
10 lru.Put(4, 1)
11 fmt.Println(lru.head.next)
12 fmt.Println(lru.tail.prev)
13 // lru.Put(2, 2)
14 // // fmt.Println(lru.dLList.head)
15 // lru.Get(1)
16 // lru.Put(3, 3)
17 // fmt.Println(lru.dLList.tail.value)
18 // fmt.Println(lru.Get(2))
19
20}
21
22type LRUCache struct {
23 cacheMap map[int]*DLNode

Callers

nothing calls this directly

Calls 2

PutMethod · 0.80
ConstructorFunction · 0.70

Tested by

no test coverage detected