Friday 24 February 2017

Second Min And Second Max With Update Using Segment Tree


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



View Ramesh Chandra's profile on LinkedIn

Ramesh Chandra

No comments:

Post a Comment