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

Method build

src/class161/Code06_Tourism1.java:199–208  ·  view source on GitHub ↗
(int l, int r, int i)

Source from the content-addressed store, hash-verified

197 }
198
199 public static void build(int l, int r, int i) {
200 if (l == r) {
201 max[i] = min[i] = arr[seg[l]];
202 } else {
203 int mid = (l + r) / 2;
204 build(l, mid, i << 1);
205 build(mid + 1, r, i << 1 | 1);
206 up(i);
207 }
208 }
209
210 public static void add(int jobl, int jobr, int jobv, int l, int r, int i) {
211 if (jobl <= l && r <= jobr) {

Callers 1

mainMethod · 0.95

Calls 1

upMethod · 0.95

Tested by

no test coverage detected