lets say we have an array a of length n.
we are given q queries with indices l,r.
we have to locate the position of minimum or maximum value within that range....of l,r.
the constraints are
.........1<=n<=10^5 .........1<=l<=r<=n .........1<=ai<=10^9 .........1<=q<=10^5