Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/neetcode-gh/leetcode
/ get
Method
get
java/0460-lfu-cache.java:23–28 ·
view source on GitHub ↗
(int key)
Source
from the content-addressed store, hash-verified
21
}
22
23
public
int
get(
int
key) {
24
Entry e = entries.get(key);
25
if
(e == null)
return
-1;
26
updateFrequency(e);
27
return
e.value;
28
}
29
30
public
void
put(
int
key,
int
value) {
31
if
(capacity == 0)
return
;
Callers
15
LockingTree
Method · 0.45
checkDescendantsAndLockIfNeeded
Method · 0.45
backtrack
Method · 0.45
deleteAndEarn
Method · 0.45
isValid
Method · 0.45
dfs
Method · 0.45
checkSubarraySum
Method · 0.45
dfs
Method · 0.45
canFinish
Method · 0.45
isCyclic
Method · 0.45
dfs
Method · 0.45
dfs
Method · 0.45
Calls
1
updateFrequency
Method · 0.95
Tested by
1
shortestAlternatingPaths
Method · 0.36