Segment Trees on min max queries

Hey…I have to change this code into min max queries …Please modify this code into min max queries …please…i am unable to do so…

I want to give minimum and output as well in single code…help me

@Kumarrituranjan2056,
You should try coding it, we can help in debugging if needed.