Skip to content

Commit b919a22

Browse files
authored
Rename query_impl to query for clarity
1 parent cae666b commit b919a22

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/data_structures_[l,r)/seg_tree_uncommon/merge_sort_tree.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ struct merge_sort_tree {
1414
//! @time O(log(n)^2)
1515
//! @space O(1)
1616
int query(int l, int r, int vl, int vr) {
17-
return query_impl(l, r, vl, vr, 0, n, 1);
17+
return query(l, r, vl, vr, 0, n, 1);
1818
}
19-
int query_impl(int l, int r, int vl, int vr, int tl,
19+
int query(int l, int r, int vl, int vr, int tl,
2020
int tr, int v) {
2121
if (r <= tl || tr <= l) return 0;
2222
if (l <= tl && tr <= r)
2323
return ranges::lower_bound(tree[v], vr) -
2424
ranges::lower_bound(tree[v], vl);
2525
int tm = split(tl, tr);
26-
return query_impl(l, r, vl, vr, tl, tm, 2 * v) +
27-
query_impl(l, r, vl, vr, tm, tr, 2 * v + 1);
26+
return query(l, r, vl, vr, tl, tm, 2 * v) +
27+
query(l, r, vl, vr, tm, tr, 2 * v + 1);
2828
}
2929
};

0 commit comments

Comments
 (0)