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

Method pushAfter

tasks/146.go:80–84  ·  view source on GitHub ↗
(current, new *DLNode)

Source from the content-addressed store, hash-verified

78}
79
80func (this *LRUCache) pushAfter(current, new *DLNode) {
81 next := current.next
82 new.prev, new.next = current, next
83 current.next, next.prev = new, new
84}
85
86func (this *LRUCache) delete(curr *DLNode) {
87 prev, next := curr.prev, curr.next

Callers 2

GetMethod · 0.95
PutMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected