Implemented Segment tree for finding query and updation.
Getting TLE.How can I optimize to get AC?
Lazy propagation… Google it … Lazy propagation is an effective way of range update range query with complexit(log n)
Implemented Segment tree for finding query and updation.
Getting TLE.How can I optimize to get AC?
Lazy propagation… Google it … Lazy propagation is an effective way of range update range query with complexit(log n)