MCPcopy Create free account
hub / github.com/neetcode-gh/leetcode / Remove

Method Remove

go/0146-lru-cache.go:27–30  ·  view source on GitHub ↗
(node *Node)

Source from the content-addressed store, hash-verified

25}
26
27func (this *LRUCache) Remove(node *Node) {
28 prev, nxt := node.prev, node.next
29 prev.next, nxt.prev = nxt, prev
30}
31
32func (this *LRUCache) Insert(node *Node) {
33 prev, nxt := this.right.prev, this.right

Callers 2

GetMethod · 0.95
PutMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected