You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, the update and query functions for the lazy segtree (and probably some of the other data structures) look like:
voidupdate(int _i, int _j, int v, int p, int i, int j);
intquery(int _i, int _j, int p, int i, int j);
Forgetting what values are supposed go into p, i, and j has been the source of a lot of dumb mistakes. I'd like to propose the following overloads to avoid those.
voidupdate(int i, int j, int v) { returnupdate(i, j, v, 1, 0, n-1); }
intquery(int i, int j) { returnquery(i, j, 1, 0, n-1); }
The text was updated successfully, but these errors were encountered:
Right now, the update and query functions for the lazy segtree (and probably some of the other data structures) look like:
Forgetting what values are supposed go into
p
,i
, andj
has been the source of a lot of dumb mistakes. I'd like to propose the following overloads to avoid those.The text was updated successfully, but these errors were encountered: