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

Method buildIn

src/class195/Code03_Road1.java:69–82  ·  view source on GitHub ↗
(int l, int r)

Source from the content-addressed store, hash-verified

67 }
68
69 public static int buildIn(int l, int r) {
70 int rt;
71 if (l == r) {
72 rt = l;
73 } else {
74 rt = ++cntt;
75 int mid = (l + r) >> 1;
76 ls[rt] = buildIn(l, mid);
77 rs[rt] = buildIn(mid + 1, r);
78 addEdge(rt, ls[rt], 0);
79 addEdge(rt, rs[rt], 0);
80 }
81 return rt;
82 }
83
84 public static void xToRange(int jobx, int jobl, int jobr, int l, int r, int i) {
85 if (jobl <= l && r <= jobr) {

Callers 1

mainMethod · 0.95

Calls 1

addEdgeMethod · 0.95

Tested by

no test coverage detected