You're given an array of integers and queries. Each query is either:
Update: set
Query: return Constraints: . You're solving the classic problem for sqrt decomposition. Before reading the solution, think about whether segment trees or sqrt decomposition would be better here. What's the tradeoff?