Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/qiyuangong/leetcode
/ get
Method
get
java/904_Fruit_Into_Baskets.java:66–68 ·
view source on GitHub ↗
(int k)
Source
from the content-addressed store, hash-verified
64
65
class
Counter extends HashMap<Integer, Integer> {
66
public
int
get(
int
k) {
67
return
containsKey(k) ? super.get(k) : 0;
68
}
69
70
public
void
add(
int
k,
int
v) {
71
put(k, get(k) + v);
Callers
2
totalFruit
Method · 0.95
add
Method · 0.95
Calls
1
containsKey
Method · 0.80
Tested by
no test coverage detected