MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / query

Method query

Data Structures/Permutation Tree.cpp:50–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48 pull(n);
49 }
50 int query(int n, int b, int e, int i, int j) {
51 push(n, b, e);
52 if (i > e || b > j) return inf;
53 if (i <= b && e <= j) return t[n];
54 int mid = (b + e) >> 1;
55 return combine(query(lc, b, mid, i, j), query(rc, mid + 1, e, i, j));
56 }
57} t;
58
59// id of span {i, i} is i

Callers 1

buildFunction · 0.45

Calls 3

pushFunction · 0.70
combineFunction · 0.70
queryFunction · 0.70

Tested by

no test coverage detected