Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Range Sum Query - Mutable

Support two operations on an integer array: update i v (set nums[i] = v) and sum l r (sum of indices l..r inclusive). Print the result of every sum operation.

Constraints

1 <= n <= 3 * 10^4 1 <= q <= 3 * 10^4

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.