What is the approach for solving GSS1 and GSS3 on SPOJ using segment trees?
Could anyone else explain Spoj GSS1 problem by drawing a segment tree?