Hi everyone, does (2D range add update, and range sum queries) fenwick and segment tree exist?
If there is could someone kindly provide me ur code? Thanks :)
I tried googling but I didn't find anything really useful. :( Edit: Like by range I mean for e.g. (a,b) to (c,d), for a<=c && b<=d.









2-D Fenwick:
i = (i & (i + 1)) - 1andi = (i | (i + 1))? Why noti -= i & -iandi += i & -i?i = (i & (i + 1)) - 1andi = (i | (i + 1))for 0-indexation;i -= i & -iandi += i & -ifor 1-indexationhmm the inc part looks like point update to me? R u sure that's range update?? Like by range I mean for e.g. (a,b) to (c,d), for a<=c && b<=d.
is there range update on fenwick tree?
Yes, see here.