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

Method build

src/class184/Code02_Difficult1.java:88–95  ·  view source on GitHub ↗
(long[] tree, int l, int r, int i)

Source from the content-addressed store, hash-verified

86 }
87
88 public static void build(long[] tree, int l, int r, int i) {
89 tree[i] = -INF;
90 if (l < r) {
91 int mid = (l + r) >> 1;
92 build(tree, l, mid, i << 1);
93 build(tree, mid + 1, r, i << 1 | 1);
94 }
95 }
96
97 public static void clear(long[] tree, int l, int r, int i) {
98 if (tree[i] == -INF) {

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected