Do I need to use the lazy propagation technique in this question ,although this question seems to as a straightforward segment tree question ?
code link
Do I need to use the lazy propagation technique in this question ,although this question seems to as a straightforward segment tree question ?
code link
its a single point update , so there is no use of lazy propagation,
lazy propagation is used when there is range update
So why is this code getting a TLE
sorry I forgot to attach gist…I have done it now
now can you help me?
you can watch my segment tree class , it would never give a tle
yours is giving tle because you are passing the vector agaian and again , just initialise it once