Hey , i was learning persistent segment trees , i got what the concept behind it and now i have to solve problems.I guess people out here might be having some built in templates , can you share yours so that i can see how to efficiently code it as i read that too much pointers can cause TLE.
HOW TO UPDATE RANGES USING LAZY PROPAGATION IN THIS METHOD