SEGMENT TREE
To perform following operation(<10^5) on given array(<10^5) :
U I V - Update the value present at I with value V
A L R - Find the sum between range L and R
M L R - Find the maximum number between L and R
m L R - Find the minimum number between L and R
S L R - Find second maximum value in between L and R
s L R - Find second mimimum value in between L and R
Ramesh Chandra