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

Method prepare

src/class143/Code01_Elevator.java:56–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54 public static boolean[] visited = new boolean[MAXN];
55
56 public static void prepare() {
57 cnt = 1;
58 heap.clear();
59 Arrays.fill(head, 0, x, 0);
60 Arrays.fill(distance, 0, x, Long.MAX_VALUE);
61 Arrays.fill(visited, 0, x, false);
62 }
63
64 public static void addEdge(int u, int v, long w) {
65 next[cnt] = head[u];

Callers 1

mainMethod · 0.95

Calls 2

clearMethod · 0.45
fillMethod · 0.45

Tested by

no test coverage detected