MCPcopy
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
65class 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

totalFruitMethod · 0.95
addMethod · 0.95

Calls 1

containsKeyMethod · 0.80

Tested by

no test coverage detected