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

Method clear

src/class149/SkipList1.java:57–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55
56 // 使用多少空间一律清空
57 public static void clear() {
58 Arrays.fill(key, 1, cnt + 1, 0);
59 Arrays.fill(count, 1, cnt + 1, 0);
60 Arrays.fill(level, 1, cnt + 1, 0);
61 for (int i = 1; i <= cnt; i++) {
62 Arrays.fill(next[i], 0);
63 Arrays.fill(len[i], 0);
64 }
65 cnt = 0;
66 }
67
68 // 扔骰子决定节点的层数
69 public static int random() {

Callers 1

mainMethod · 0.95

Calls 1

fillMethod · 0.45

Tested by

no test coverage detected