I know how to do range update and range query both operations using BIT (as above solution) , but in above question type 2 query says to set value ‘c’ to each index i which is lie between a to b . How can I do this ?
I know how to increment by X in range from L to R , but how can I set X in range from L to R using BIT ?
I am seeing type 2 queries first time , I don’t think type 2 is BIT.
Means not solvable by BIT , fr apna kaam khallas
see william lin’s method - time stamp 7hr 1min
Segment Tree , I saw already , but i wanna solve using BIT if possible
I would definitely go for a Seg Tree; maybe there’s a way of doing it using a couple of BITs but I don’t see any straightforward solution
But if possible please think