can any one help what is the mistake i have done i am getting wrong answer??
question link:click here
solution link:click here
There’s a minor mistake!
In your code:-
r = query(2*si,ss,mid,qs,qe);
//But it should be
r = query(2*si,mid+1,se,qs,qe);