MCPcopy Create free account
hub / github.com/algorithmzuo/algorithm-journey / delNum

Method delNum

src/class194/Code08_Tourists1.java:81–88  ·  view source on GitHub ↗
(int u, int num)

Source from the content-addressed store, hash-verified

79 }
80
81 public static void delNum(int u, int num) {
82 int cnt = maps.get(u).get(num);
83 if (cnt == 1) {
84 maps.get(u).remove(num);
85 } else {
86 maps.get(u).put(num, cnt - 1);
87 }
88 }
89
90 public static int getMin(int u) {
91 return maps.get(u).firstKey();

Callers 1

mainMethod · 0.95

Calls 3

getMethod · 0.45
removeMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected