Is it possible to locate the max or min value in a range of indices l,r in an array for q queries??

Revision en1, by saptarshikuar2003, 2025-01-28 20:34:42

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

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English saptarshikuar2003 2025-01-28 20:36:06 22 Tiny change: '<=ai<=10^9' -> '<=ai<=10^9\n.........1<=q<=10^5'
en1 English saptarshikuar2003 2025-01-28 20:34:42 364 Initial revision (published)