Build a NumArray class over an integer array that supports point updates and range-sum queries.
new NumArray(nums) — takes a copy of the arrayupdate(i, val) — replaces the value at index i with val (it is not a delta)sumRange(l, r) — the sum of indices l through r inclusive, with 0 <= l <= r < nums.length- Both
update and sumRange must run in O(log n). Re-summing the slice on every query, or rebuilding prefix sums on every update, is not acceptable — the tests interleave thousands of both - Values may be negative